RSS

LuxCal Forum

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

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / Public Events hidden from logged-on users
Posted:  11 Jan 2015 19:30
Hi all

(thanks for LuxCal - it's just what we need)

Now, there's a slight issue with the latest version.

I have a group of users who should like to add/edit own events in categories "Pool Laptop 1" and "Pool Laptop 2", but they should not be able to edit anything else. So, in the user group I selected the two above mentioned categories and all is fine.

However, these users, as long as they are logged on, cannot see categories marked as public. Shouldn't these users see both their own category plus everything that is marked as public? If I give the group add/edit to all categories, they can (and probably will) inadvertedly "publish" internal information to the public. But when they cannot see eg the meeting room calendar without logging off first, ...?

Would be nice if the logged-on user always sees the public categories, whether or not he's authorized to add/edit events there.

Or am I missing something?

--
Ben
Posted:  11 Jan 2015 23:17
okay... (this didn't let me sleep...) I figured out a hack:

in common/retrieve.php, change lines 106 and 123 from

Code:


($ucats != '0' ? "nAND c.ID IN ($ucats)" : '')."

to

Code:


($ucats != '0' ? "nAND (c.ID IN ($ucats) OR c.public = 1)" : '')."


Now everything marked as public will appear as well, but it isn't editable as it was probably done by a different user anyway. Category shows up fine in the hover text but will be reverted to "admin" when you click on such an entry - but that's a minor detail.

Would be nice if you consider adding this into a future version...

Cheers, Ben
Posted:  17 Jan 2015 00:05
Hi Ben,

Sorry, but we can't take any responsibility for not getting enough sleep wink

But you are right, this is a discrepancy in the last SQLite version of LuxCal. Users in a certain group should also see the events in categories that can be seen by the public user.

Your code change is a step in the right direction.
However, alter some detailed analysis we came to the conclusion that the column 'public' in the categories table has become redundant. With the introduction of user groups, the event categories to be displayed for the public user are now defined in the group to which the public user belongs. So there is no need anymore to specify per category if the public user is allowed to see these events.

This change affects several scripts and we are currently busy to implement the change.

Thanks for reporting this problem.
Roel