Opened 8 years ago

Last modified 6 years ago

#12626 new enhancement

WEEK_VIEW permission

Reported by: anonymous Owned by: lucid
Priority: normal Component: WeekPlanPlugin
Severity: normal Keywords:
Cc: Trac Release:


I've noticed that without WEEK_PLAN permission assigned is not even possible to view the planning. So for example the anonymous user can not see the planning. It would be useful to have a WEEK_VIEW permission, so that can be decided the group of users that can see and edit the week plan and the group that can just only see the plan, and finally users that can't edit neither see the plan.

Attachments (3)

T12626_permissions.patch (1.9 KB) - added by lucid 6 years ago.
T12626_permissions_ui.patch (2.2 KB) - added by lucid 6 years ago.
T12626_delete_dialog.patch (2.8 KB) - added by lucid 6 years ago.

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by lucid

Attachment: T12626_permissions.patch added

comment:1 Changed 6 years ago by lucid

Sorry for the late reply. Can you try attachment:T12626_permissions.patch?

comment:2 Changed 6 years ago by Ahmad Syukri

I can confirm the attachment works but even with only WEEK_VIEW permission enabled, the event creation dialog still opens when you click on a date. The server returns 403 in background when you click "create" and nothing happens, so at least the other permissions are actually honored.

Changed 6 years ago by lucid

Attachment: T12626_permissions_ui.patch added

comment:3 Changed 6 years ago by lucid

Thanks for testing! Could you maybe also try this additional patch to make the dialog / buttons not appear at all when permissions are missing?

comment:4 Changed 6 years ago by Ahmad Syukri

Sorry for the late response.

I've tested by giving different permissions to different users.

  • WEEK_PLAN_CREATE works correctly. New event can be created by clicking on empty space of any day. Clicking on existing event yields no response.
  • WEEK_PLAN_MODIFY is also working. No new event can be created, but clicking on existing event opens the modify dialog. "Delete!" button is not shown.
  • Unfortunately, WEEK_PLAN_DELETE does not work without MODIFY permission. Clicking on existing event does nothing. Only with MODIFY permission does one get the dialog, with both "Edit" and "Delete!" button available.

comment:5 Changed 6 years ago by lucid

Thanks again. Ah, right. Do you think there are even good usecases for having WEEK_PLAN_DELETE but not WEEK_PLAN_MODIFY? Maybe even WEEK_PLAN_ADMIN would be enough? Or maybe I'll check later if it's easily possible to have the dialog with only the "Delete!" button. It might look weird.

Changed 6 years ago by lucid

Attachment: T12626_delete_dialog.patch added

comment:6 Changed 6 years ago by lucid

This additional patch should do it.

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain lucid.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.