RoleId() in plugin

As stated here: Journal settings and role (the topic is closed so I cannot reply there) I needed to differentiate the Admin and the Journal Manager navigation in the backend.
I started then a plugin to do that. The problem is I cannot understand the RoleId() function: if I am with a site_admin account it doesn’t recognize it as site admin. I echoed the output to see the roleId, but it seems wrong.

The code is here: restrictNavigation/ at master · marlara/restrictNavigation · GitHub.
I am also open to share the final version and have suggestions from the community, if it useful for others.

1 Like

So, I found the problem and now the plugin works. This is just a scheleton, I still have to ameliorate this, any suggestion is welcomed.

This topic was automatically closed after 5 days. New replies are no longer allowed.