page authorization bug?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
4/16/2011 1:09:59 AM
Gravatar
Total Posts 14

page authorization bug?

Hi all,

I had spent almost 4 hours tried to find out what was wrong with the page access issue (the menu disappeared even though I had made sure that all the rights were correct).

Here is how you can reproduce it:

1. create a role with space at the end

2. make a user member of the role created in step 1

3. give the role view access the page.

4. verify the user DO NOT have access to the page. ( this is a the first bug)

5. update the role and remove the space at the end

6. try to view the page again and it is not working even the condition that caused the error was fixed ( this is the second bug).

It seems that the mp_pages table stored the roles after the step 6 and doesn't get update at all.

Regards,

dl

 

4/16/2011 6:01:54 AM
Gravatar
Total Posts 18439

Re: page authorization bug?

Hi Derek,

Roles have both a role name and a display name, once a role is created the role name never changes, if you edit it only the display name changes. This feature makes it possible to localize the system role names without breaking anything, ie we can't have people really renaming the Administrators role. So if you really need to change the underlying role name for a custom role the only way is to delete it and then re-create it. At the time of creation the role name and the display name are both the same. The role name is what is really used for role checks and the display name is only what is displayed.

Also when you add a user to a new role, it does not become active until the user logs out and logs in again so that he gets a new role cookie.

Hopefully those 2 factors shed some light on the problem. I can make it trim any white space from the end of the name when creating roles, I'll look into that for the next release.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.