RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / LuxCal / Comments and Suggestions / Restrict category access by user
Posted:  07 Nov 2015 19:17
Are there any code modifications to restrict access to categories by user?

Thanks
Mark Saginaw, Michigan
Posted:  07 Nov 2015 19:48
Hello Mark

If I understand You right, You are looking for a setup possibility for categories.
I think You could setup a usergroup where You specifies the categories to be used, and then You attach the user to that usergroup.
Posted:  07 Nov 2015 23:32
Thanks. It didn't work.

When I log into the user that is only a member of the group that can view only one category I can still see all categories. As a matter of fact all categories was selected by default when logging in as this user. Go figure.

Roel, Do you know why the usergroups / user method for restricting access to categories doesn't work? Is it broke in v422M ?

Mark Saginaw Michigan
Posted:  08 Nov 2015 10:33
Hello Mark

Just tried it myself.
It works in the "new" v422M

In the testpage http://www.bramminginfo.dk/page-4.html I have set up that "read access" should be able to see :
DDBU-S3-1+2 and DDBU-OB-hold1-5.
Works fine
I have set up a usergroup for "Schwartz" ( pass Schwartz if anyone will try ) with rights "own events".
This user can only see LKVejen-hold1 + LKvejen-hold4.
And this user is only presented  for the same 2 categories when creating or updating an event.

So in my version of 422M it ain't broke - it functions as I am expecting it to.
Posted:  08 Nov 2015 11:12
Additional information : The user Schwartz can see for "lower" rights + his own.
As anonymos users has access to view DDBU-S3-1+2 and DDBU-OB-hold1-5, the user Schwartz has also rights to view these + his own LKVejen-hold1 + LKvejen-hold4. But when it comes to editing the user Schwartz has only the rights that is set up for him : LKVejen-hold1 + LKvejen-hold4.

It can be discussed if it is logical that view-rights are "summed up", some would say yes, some would say no.
Maybe there is a bug, as I think I saw only the  LKVejen-hold1 + LKvejen-hold4 in the view for Schwartz the first time I was logged in.
Perhaps Roel can tell us, if it is the specified rights in the group or it is the sum of specified rights in the group that it is intended to be.
Posted:  09 Nov 2015 10:57   Last Edited By: Roel B.
Good morning Mark & John,

It works as follows:
Suppose . . .
- there are 4 event categories, "red", "green", "blue" and "yellow".
- the public user is part of a group that can see "red" and "green", but has no edit rights.
- the user Titan (name of my horse) is part of a group that can see "green" and "blue" and has edit rights.

Now, when Titan logs in, he can see and edit events in categories "green" and "blue" and he can see but not edit "red".

Why can Titan see "red"? Because the public user can see "red" and it would not be fair that a logged-in user would see less than a public user.

In other words: An authenticated user has the sum of his/her own rights + the public user rights.

Hope this clarifies the matter.
Roel
Posted:  09 Nov 2015 13:58   Last Edited By: Roel B.
Thanks Roel. It is what I expected it to. A clever horse You have.
I will step out of this thread but not close it, as it is not mine.
My former link will not be available as I wrote, as I am going to test some other things there.
Hope You get/has got  Your problem solved Mark.