Hi Joe!
Thanks for the quick debug. It's good you found and solved that problem.
As you said, however, the issue I posted seems not just related to the substring control on role name.
To simplify my post I mentioned Role "A" and "B" but the real case is more articulated.
I tried to reproduce from scratch the case in my test site (new pages, modules, roles, users, etc...) to verify whether I missed
anything and whether the problem is systematic or occasional.
When I tested one Shared file module with the appropriate security settings it was working but as I reproduced on the test site the
exact layout of the production site page I got the error.
THE PROBLEM OCCURS ONLY IF MORE THAN ONE SHARED FILE MODULE IS PLACED IN THE PAGE CONTENT !
I'll try to explain better because I think this issue could be interesting for other people and you could reproduce it as well in your
development environment.
According to my tests, the permission error does not show for features other than Shared Files; all modules I used are correctly
visible/not visible in line with permissions settings, but for Shared File I got the error when I try to open the file itself
within the module.
The portal I'm working on contains in main menu a page dedicated to the members of the association (page "Members Area").
Page "Members Area" is visible to anonymous and registered users who are respectively invited to login and apply for accreditation.
No other content is visible to them.
Registered users are accredited after enrollment to "Association Members" role by the Administrator so they can view the other contents of
the page. All sub-pages of "Member Area" are reserved to "Association Members" ("Roles that can view the page" Tab of Security Settings is
checked on "Association Members" role)
Up to this point everything works fine but then comes the problem.
Accredited Users (one or more members of "Association Members" role) could also be part of a member company/group, so I created
this new roles:
"000000 - Member A" (Member Company A and related ref.no.)
"999999 - Member B" (Member Company B and related ref.no.)
...
"###### - Member X" (Member Company X and related ref.no.)
The sub-page "Member Documents" (Member Area > Member Documents) contains several Shared Files Modules, one for each "Member
Company".
Each SF Module has the following security settings:
Roles that can view this content: "###### - Member X" (checked)
Roles that can edit this content: "Administrators" (checked)
How does it work ?
Administrator can reach the page "Member Area" > "Member Documents" and can view/edit content of all contained SF Modules (Right!)
Registered User, member of "Association Members" and "###### - Member X", can view the page and "only his" Shared Files module with
the permission to view assigned to "###### - Member X" role (Right!)
When registered user click on the contained file, he gets the permissions error page (Wrong!)
I hope this report, more detailed than the previous, helps you to replicate and fix the issue.
In case you wish to make any preliminary validation testing of the module before distribution of next release, please do not hesitate
to send me the amended object(s).
Thanks again for the support.
Diego
PS: I have just updated our translation into Italian of mojoPortal 2-3-0-4-b and made it downloadable to registered users on our new site dedicated to mojoPortal projects at http://www.effectiveweb.it/download.aspx. Feel free to use/distribute.