Page 1 of 1

Lost User Permissions

Posted: Fri Sep 06, 2013 10:34 am
by Swede68

When I upgraded to a new version of PHPMaker which adds the new Project ID to the User Level Permissions, it lost all of the permissions, and no one other than admins are now able to log in.


Re: Upgraded Version and Lost all User Permissions

Posted: Fri Sep 06, 2013 1:24 pm
by mobhar

There are two options you can do to adjust the new permissions:

  1. Update the "userlevelpermissions" table, by appending the Project ID string at the beginning of the value of "tablename" field.
    For example, your Project ID is {362268AD-57A2-462E-9270-F28F64FFE82A}, then simply execute the following SQL:
    UPDATE userlevelpermissions SET tablename = CONCAT('{362268AD-57A2-462E-9270-F28F64FFE82A}', tablename);

or:

  1. Migrate the new structure of the user level permissions from "Security" -> "Advanced" -> "User Levels" -> "Dynamic User Levels", then click on "Migrate" button.

Don't forget to backup your database first!


Re: Lost User Permissions

Posted: Wed Sep 11, 2013 7:34 am
by Swede68

Thanks for the reply mobhar.

I was successful in migrating the new structure. When I check the "userlevelpermissions" table in phpMyAdmin, all records have the Project ID appended. All of the userlevel records are there as well. But when I log into the website and go to UserLevels/Permissions, no tables are selected.

Could it be that it is now looking for "{31D80717-833E-4B63-9E31-6DDD2FD96781}Table Name" instead of simply "Table Name"? Do I need to rename all the tables with the Project ID prefix?

I don't want to go back and re-enter all the permissions.

Thanks again for your help.


Re: Lost User Permissions

Posted: Wed Sep 11, 2013 9:42 am
by mobhar

Swede68 wrote:
But when I log into the website and go to UserLevels/Permissions, no tables are
selected.

Could it be that it is now looking for
"{31D80717-833E-4B63-9E31-6DDD2FD96781}Table Name" instead of
simply "Table Name"? Do I need to rename all the tables with the
Project ID prefix?

Yes, you need to rename all the tables by appending the Project ID. As always, backup your database/table first before taking the action!


Re: Lost User Permissions

Posted: Wed Sep 11, 2013 10:05 am
by danielc

After migrating your project, your userlevelpermission table will be prefixed by your Project ID and table name automatically the script. (Does the user has UPDATE permission for the user permission table?) You will be able to see the same permission. Does your userlevelpermission table for the field 'table name' change to {Project ID}Table Name?

Also, make sure your Project ID is the same. If you use "save as" to backup your project, Project ID will change. (Use "save a copy" to backup a project, see Project File in the help file.)