Forum

Thread tagged as: Question, Problem, Error

Refreshing Role Privileges

The controls for forms in the role privilege section is not there. All other apps show up, just not forms. Cuurently running perch 2.8.18 and forms 1.8.3. Is there a way to force perch to rewrite the roles tables in the db? Here is the debug message from the admin page:

Debug Message SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='cca8db7009de57b3acd7986e0490750e' LIMIT 1 UPDATE perch2_users SET userHash='b0d244dae0aa46df9617df337708f05c' WHERE userID='1' SELECT p.privKey FROM perch2_user_privileges p SELECT * FROM (SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID SELECT * FROM perch2_user_roles WHERE roleID=1 LIMIT 1 Array ( [roleTitle] => Editor [privs-perch] => Array ( [0] => 1 )

[privs-assets] => Array
    (
        [0] => 25
        [1] => 26
    )

[privs-content] => Array
    (
        [0] => 7
        [1] => 8
        [2] => 9
        [3] => 16
        [4] => 17
        [5] => 10
        [6] => 19
    )

[privs-perch_blog] => Array
    (
        [0] => 29
        [1] => 30
        [2] => 31
        [3] => 32
    )

[submit] => Save changes
[formaction] => role
[token] => 5951721ae9da0242fe7d30645a09ab2d

) UPDATE perch2_user_roles SET roleTitle='Editor', roleSlug='editor' WHERE roleID='1' DELETE FROM perch2_user_role_privileges WHERE roleID='1' INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('1','1') INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('25','1') INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('26','1') INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('7','1') INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('8','1') INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('9','1') INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('16','1') INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('17','1') INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('10','1') INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('19','1') INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('29','1') INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('30','1') INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('31','1') INSERT INTO perch2_user_role_privileges(privID,roleID) VALUES('32','1') Setting alert: Role successfully updated. (success) SELECT privID FROM perch2_user_role_privileges WHERE roleID=1 SELECT DISTINCT *, SUBSTRING_INDEX(privKey, '.', 1) AS app FROM perch2_user_privileges ORDER BY app='perch' DESC, app ASC, privOrder ASC Queries: 40 Memory: 1.928

Many thanks for all the help.

Jared Medley

Jared Medley 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you post your diagnostics?

I actually just went in and created the rows in the sql database. Looks like it's working now.