Hello Olaf,
excuse my English..
I have observed that in the latest versions of AppGini 23, something happens in the FIELD PERMISSIONS configurations (V1.15) and it does not block the fields, it just hides them, sometimes yes or sometimes no. Could it be something that was reconfigured?
thank you for your time
Field Permissions (hide / lock fields by usergroup)
Re: Field Permissions (hide / lock fields by usergroup)
Luis Ramirez R.
Re: Field Permissions (hide / lock fields by usergroup)
Hi,
I want to apologize for not seeing your replies sooner.
@urichard: If i remember correct: yes, you do need Jan's add on.
@lramirez: Thanks for letting me know. I might check this out in the next couple of days, but I will test only on the latest AG (24.10 rev 1579). It does not make sense to test older software.
It may depend on the field type. Can you please post more details where what problems occur. Thanks.
Olaf
I want to apologize for not seeing your replies sooner.
@urichard: If i remember correct: yes, you do need Jan's add on.
@lramirez: Thanks for letting me know. I might check this out in the next couple of days, but I will test only on the latest AG (24.10 rev 1579). It does not make sense to test older software.
It may depend on the field type. Can you please post more details where what problems occur. Thanks.
Olaf
Some postings I was involved, you might find useful:
Multi Path Upload (MPU) / dynamic upload folder; SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button
Multi Path Upload (MPU) / dynamic upload folder; SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button
-
- Posts: 2
- Joined: 2024-09-18 10:34
Re: Field Permissions (hide / lock fields by usergroup)
Hello Olaf and friends!
I've new to the forums but have been using appgini for a few years.
I'm not the best coder but I've made do with appgini throughout the years but I seriously need some help this time.
I've been trying to implement field permissions and have tried every version with a similar problem.
I have reset my database and redone it step-by-step multiple times!
View_membership_groups = Good
but my tmp_tables_fields table is empty and so my db_field_permissions won't load.
If I don't do step 5 and erase/remove these:
Then the db_field_permissions table will load but the tmp_tables_fields is still blank.
I ran these sql and everything seems to be fine in the backend. (photos attached)
Is there something wrong with the calling of my function fill_tmp_tables_fields(){
or
am I doing something wrong?
Please help I'm stressing! I believe the field settings are a bit off as well but i don't think it's causing this issue.
I've read through the others comments but couldn't find a solution. (I believe "ckebbell" back in 2020 may have had a similar issue but the solution was not posted.)
V.1.21 field permissions script with Appgini 24.17
Thank You.
(Also, I'm a big fan of all of the appgini team and am excited to finally be able to post and advance. Thank you for your time and all your continued hard work!)
I've new to the forums but have been using appgini for a few years.
I'm not the best coder but I've made do with appgini throughout the years but I seriously need some help this time.
I've been trying to implement field permissions and have tried every version with a similar problem.
I have reset my database and redone it step-by-step multiple times!
View_membership_groups = Good
but my tmp_tables_fields table is empty and so my db_field_permissions won't load.
If I don't do step 5 and erase/remove these:
Code: Select all
<?php
//Field Permissions Code
if (!function_exists('fill_tmp_tables_fields')) {
include("hooks/field_permission_tmp.php");
}
// For help on using hooks, please refer to https://bigprof.com/appgini/help/advanced-topics/hooks/
function db_field_permission_init(&$options, $memberInfo, &$args) {
fill_tmp_tables_fields();
return TRUE;
}
Then the db_field_permissions table will load but the tmp_tables_fields is still blank.
I ran these sql and everything seems to be fine in the backend. (photos attached)
Code: Select all
SHOW FULL TABLES WHERE table_type = 'BASE TABLE';
Code: Select all
SHOW COLUMNS FROM BStandards
Is there something wrong with the calling of my function fill_tmp_tables_fields(){
or
am I doing something wrong?
Please help I'm stressing! I believe the field settings are a bit off as well but i don't think it's causing this issue.
I've read through the others comments but couldn't find a solution. (I believe "ckebbell" back in 2020 may have had a similar issue but the solution was not posted.)
V.1.21 field permissions script with Appgini 24.17
Thank You.
(Also, I'm a big fan of all of the appgini team and am excited to finally be able to post and advance. Thank you for your time and all your continued hard work!)
- D Oliveira
- AppGini Super Hero
- Posts: 353
- Joined: 2018-03-04 09:30
- Location: David
Re: Field Permissions (hide / lock fields by usergroup)
Try chaging updateDB.php directly, edit the column definitions in the php file and appgini will be happy
-
- Posts: 2
- Joined: 2024-09-18 10:34
Re: Field Permissions (hide / lock fields by usergroup)
Hi D Oliveira,
I'm assuming you mean for me to edit this code for the tmp_tables_fields.
Unfortunately, I am unsure how I am supposed to edit the tmp_tables_fields to call my table fields.. as the script is supposed to do.
Could you maybe elaborate on how I can solve this?
I even tried to alter view_membership_groups in the updateDB.php to match the database definitions, to not avail. I don't know why it says I have 2 errors to fix. but the pdf says to have groupID as the primary key so I'm just going to leave it for now.
I've reentered Step 5 into my db_field_permissions.php and it is still not loading as shown.
TMP FIELDS not called.
Any advice would be much appreciated!
Thanks!!
Hannah
I'm assuming you mean for me to edit this code for the tmp_tables_fields.
Code: Select all
setupTable('view_membership_groups', [
" ALTER TABLE `view_membership_groups` CHANGE `allowSignup` `allowSignup` TINYINT NULL ",
" ALTER TABLE `view_membership_groups` CHANGE `allowSignup` `allowSignup` TINYINT(4) NULL ",
" ALTER TABLE `view_membership_groups` CHANGE `needsApproval` `needsApproval` TINYINT NULL ",
" ALTER TABLE `view_membership_groups` CHANGE `needsApproval` `needsApproval` TINYINT(4) NULL ",
" ALTER TABLE `view_membership_groups` CHANGE `name` `name` VARCHAR(100) NULL ",
"ALTER TABLE `view_membership_groups` DROP INDEX `name_unique`",
" ALTER TABLE `view_membership_groups` CHANGE `groupID` `groupID` INT(10) NOT NULL ",
" ALTER TABLE `view_membership_groups` CHANGE `groupID` `groupID` INT(10) UNSIGNED NOT NULL ",
" ALTER TABLE `view_membership_groups` CHANGE `groupID` `groupID` INT(10) UNSIGNED NOT NULL DEFAULT '0' ",
]);
setupTable('tmp_tables_fields', []);
setupTable('db_field_permission', []);
setupIndexes('db_field_permission', ['groupID','table_field',]);
Could you maybe elaborate on how I can solve this?
I even tried to alter view_membership_groups in the updateDB.php to match the database definitions, to not avail. I don't know why it says I have 2 errors to fix. but the pdf says to have groupID as the primary key so I'm just going to leave it for now.
I've reentered Step 5 into my db_field_permissions.php and it is still not loading as shown.
TMP FIELDS not called.
Any advice would be much appreciated!
Thanks!!
Hannah
Re: Field Permissions (hide / lock fields by usergroup)
Hi Hannah and all,
currently I can not take part in solving the problem, sorry. I am following this thread however and will post once I have the chance to try myself.
Olaf
currently I can not take part in solving the problem, sorry. I am following this thread however and will post once I have the chance to try myself.
Olaf
Some postings I was involved, you might find useful:
Multi Path Upload (MPU) / dynamic upload folder; SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button
Multi Path Upload (MPU) / dynamic upload folder; SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button