How can I modify any application to have more than one super admin?
Is there a file that I can hard code them with user and password so I can circumvent the limitation of only one super admin in appgini?
My main goal is to have more than one super admin to be able to change the record owner. I want to have a few people that is able to change the record owner in all the tables of the database.
Multiple Super Admins?
Re: Multiple Super Admins?
Sure, nycwebmaster,
go to incfunctions.php in the Admin folder
locate the Function get logged admin
and update to this
go to incfunctions.php in the Admin folder
locate the Function get logged admin
and update to this
Code: Select all
function getLoggedAdmin(){
// checks session variables to see whether the admin is logged or not
// if not, it returns FALSE
// if logged, it returns the user id
$adminConfig = config('adminConfig');
if($_SESSION['adminUsername']!=''){
return $_SESSION['adminUsername'];
}elseif($_SESSION['memberGroupID']==2){
$_SESSION['adminUsername']=$_SESSION['memberID'];
return $_SESSION['adminUsername'];
}else{
return FALSE;
}
}
Re: Multiple Super Admins?
Thanks @bescott53 ... Please also check this blog post, which explains a method of modifying AppGini-generated files in a more maintainable manner: https://bigprof.com/blog/appgini/custom ... dmin-area/
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: Multiple Super Admins?
I tried this and it prevented the login dialog from appearing. Using AG 5.81, php7.0, mysql 5.7
I'm trying to allow another admin user to see the Users and admin functions pages. Due to issues with updates and fixes, at present no existing users can login in, only newly created users. Making manual changes to user tables to allow new admin user to be created, but it can't see the admin pages.
I'm trying to allow another admin user to see the Users and admin functions pages. Due to issues with updates and fixes, at present no existing users can login in, only newly created users. Making manual changes to user tables to allow new admin user to be created, but it can't see the admin pages.
Re: Multiple Super Admins?
Hi,
I have try to follow the post for hack with a hook but the result is an error 500..
probably have I made a mistake but as this thread is pretty old (I use the 5.94) there is perhaps a news version of this getloggegadmin function ?
I have try to follow the post for hack with a hook but the result is an error 500..
probably have I made a mistake but as this thread is pretty old (I use the 5.94) there is perhaps a news version of this getloggegadmin function ?
Re: Multiple Super Admins?
Hi Ahmed,
I just red the blog post you mentioned. Wouldn't it be much easier to check for custom functions first and use AG internal functions if no custom function exists?
This way the developer would be able to create his functions in e.g. /custom (or /hooks/custom) with the same filename you are using e.g. incfunctions.php. You go ahead and include these files first and the original AG files afterwards with something like this
I think this approach is for example used in the CMS Concrete5 (https://Concrete5.org) where all original files to into a different directory than custom files.
Olaf
I just red the blog post you mentioned. Wouldn't it be much easier to check for custom functions first and use AG internal functions if no custom function exists?
This way the developer would be able to create his functions in e.g. /custom (or /hooks/custom) with the same filename you are using e.g. incfunctions.php. You go ahead and include these files first and the original AG files afterwards with something like this
Code: Select all
if (!function_exists('getLoggedInUser')) {
function getLoggedInUser{
....
}
}
Olaf
Some postings I was involved, you might find useful:
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; Place a search on details view
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; Place a search on details view
Re: Multiple Super Admins?
Great idea Olaf!
Re: Multiple Super Admins?
Some postings I was involved, you might find useful:
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; Place a search on details view
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; Place a search on details view