How to configure unauthorized content

More
6 years 5 months ago - 6 years 5 months ago #70699 by Natwork
Hi,

I think their is a problem with ACL, but maybe I didn't understood correctly how it works.

I'm developping a website, with multiple access levels, basicly :
- Guest
- Logged (can access some items)
- Premium (can access more items)
- SuperUsers (can access a items)

Component's category view configuration is set to display items for non-authorized users in category-items list, with markup to tell wich level is required. This part work fine; but when any user can acces any item. Logged user can access to a premium or SuperUsers item...:huh:

Some items have a protected file in it, and file isn't accessible; so issue is quite limited.
When I check $item->has_item_access, it correclty returns 1 if user is authorized, and 0 if not, so ACL control seems OK.

How can I redirect users to login page if they try to access an non authorized access, like when a guest try to access any protected content?

I'm using FC 3.2.1.7, with J3.8.2
Attachments:
Last edit: 6 years 5 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
6 years 5 months ago - 6 years 5 months ago #70702 by ggppdk
Hello

> but when any user can acces any item

Go to Backend menu
Users / Viewing access levels

and you will see a list of usergroups

- click at every usergroup and check the access levels that the usergroup has

Note 1
that if a usergroup has an access level then its children usergroups will also have it !
e.g. the registered usergroup has access 'Registered' access level
- but it also has 'Public' access level, because 'Registered' usergroup is child of 'Public'

Note 2
with your configuration (show unauthorized) there is no viewing limitation in category view
the access level limitation should only apply to item view

Note 3
when user lands on authorized view , a guest user is redirected to login, and a logged user (if this was configured) will be redirected to the 'No access page'


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 6 years 5 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
6 years 5 months ago #70703 by ggppdk
Hello

also maybe you have hidden the system messages box

if a user can edit an item an item then in item view you will get a message
like

"Content access allowed because you can edit this item"


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
6 years 5 months ago #70708 by Natwork
Thanks again ggppdk, items was accessible because users got edit rights; but i didn't got the message displayed (site messages appears on other pages).

All works fine now, my configuration was not so bad (except for edit right), and their is no problem with FC rights management, it's important to say it.

Regards

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.327 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline