Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users can't edit events that are in folders where they have Local role editing rights #55

Open
dpopsmg opened this issue Nov 16, 2015 · 0 comments

Comments

@dpopsmg
Copy link

dpopsmg commented Nov 16, 2015

When the Calendar folder has edit, add, review rights assigned by the folders sharing tab, users cannot edit events or move events that are not theirs in calendar view.

Found this issue in Solgema/fullcalendar/browsers/adaptor.py:

diff --git a/Solgema/fullcalendar/browser/adapters.py b/Solgema/fullcalendar/browser/adapters.py
index 189cbbb..9f7ea74 100644
--- a/Solgema/fullcalendar/browser/adapters.py
+++ b/Solgema/fullcalendar/browser/adapters.py
@@ -320,7 +320,7 @@ class SolgemaFullcalendarEditableFilter(object):
def _listSFAllowedRolesAndUsersModify(self):
sm = getSecurityManager()
user = sm.getUser()

  •    effective_roles = user.getRoles()
    
  •    effective_roles = user.getRolesInContext(self.context)
     if sm.calledByExecutable():
         eo = sm._context.stack[-1]
         proxy_roles = getattr(eo, '_proxy_roles', None)
    

getRoles() method only evaluates users roles at root of site. getRolesInContext(self.context) evaluates users roles in the folder that is being read for events.
This bug means editable property of event in JS calendar is not set correctly for non logged in user unless patchted. ;-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant