We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

User role and "Please Sign in to view this page". | Forum

Jozko Dec 23 '17

I added a new user role to my dating site. But there is strange message when signed user like to access the content which is not permitted with his user role. He get the message "Please Sign in to view this page."!!!!  Is there no message like "Your user role is not allowed to view this content. Please upgrade your profile..."?


dave Leader
dave Jan 14 '18
You can change the text in the language section. 
Jozko Jan 15 '18
Yes, I did, but is strange, because this message appers allso to no logged users too.

I added.

Please Sign in,


Uprgrade your profile.

dave Leader
dave Jan 15 '18
Its a static oxwall core message. If you want guests to view the site you need to change a few settings. 

Check the guest role in user roles

In admin settings change "guests can view the site" to yes

Edit the pages section buttons and select guest for those pages you want guest to view. 

The Forum post is edited by dave Jan 15 '18
Jozko Jan 16 '18
Yes dave, I already setted as you sugested.... :-(

I just want that only users with Gold role can see photo in full view. See the attachement.

  User roles.jpg (68Kb)
dave Leader
dave Jan 16 '18
I am thinking that even with the oxwall bug that should work.  Its probably something wrong in the photo plugin itself.  If i have some time tonight ill check out the plugin and see if i can tell you how to edit it to work for you :)
Jozko Jan 18 '18
Thats very kind of you Dave.
Jozko Jan 25 '18
Dave.... Any news about this issue? I think it should appear  the text under {text key='photo+auth_view_permissions'}
dave Leader
dave Jan 25 '18
Hi, not yet but i will check this out asap, i have to do this in my spare time.  

On another subject, you might want to see this just in case, there is another bug in oxwall permissions.  https://developers.oxwall.com/forum/topic/42991?&page=2

The Forum post is edited by dave Mar 29 '18
Jozko Mar 29 '18
Hi Dave, Any news?
dave Leader
dave Mar 29 '18
No sorry, i have not found a way yet, but it is up to the oxwall team to change things and they went poof!
The Forum post is edited by dave Mar 29 '18
Jozko Mar 29 '18
Yes, thats sad. :-(
Jozko May 11 '20
It's sad. Meaning user roles do not make sense. :-(
Ken May 11 '20
if (OW::getUser()->isAuthenticated()) { .........}
In either your controller or your component folder/somefile.php and change it to
if (OW::getUser()->isAuthenticated()) {
if (!OW::getUser()->isAuthorized('PLUGINKEY', 'ACTION')) {
$status = BOL_AuthorizationService::getInstance()->getActionStatus('PUGINKEY', 'TEXT');
dave Leader
dave May 12 '20

Ken, thanks but the issue is that if the plugin does not have a action assigned to that feature then that wont work.  

In this case the photo plugin does not have a "view full size" action assigned to the role permissions so trying to capture that event would mean a mod to the photo plugin.  And even adding a listener.

The only other way i can even think of is (stab in the dark) possibly with some specialized js and css it could be trapped but it would take someone alot better at js and css than me.  Then that code could be added to the oxwall header or footer field, and the css to the custom css field without modding the plugin, but as i said this is a stab in the dark.

The Forum post is edited by dave May 12 '20
Jozko May 12 '20
Thx Ken and dave.  Hope we will find a solution.