Browse Source

fixed current_user_rights

sferot 10 years ago
parent
commit
82afec4dde
1 changed files with 6 additions and 1 deletions
  1. 6 1
      pboard/pboard/controllers/root.py

+ 6 - 1
pboard/pboard/controllers/root.py View File

@@ -143,7 +143,12 @@ class RootController(BaseController):
143 143
 
144 144
         user_specific_group_rights = pld.PODStaticController.getUserDedicatedGroupRightsOnNode(loCurrentNode)
145 145
 
146
-        current_user_rights = pld.PODStaticController.DIRTY_get_rights_on_node(loCurrentUser.user_id, loCurrentNode.node_id)
146
+        if node_id != 0:
147
+            current_user_rights = pld.PODStaticController.DIRTY_get_rights_on_node(loCurrentUser.user_id, loCurrentNode.node_id)
148
+            if loCurrentNode.owner_id == loCurrentUser.user_id:
149
+                current_user_rights.rights = 3
150
+        else:
151
+            current_user_rights = None
147 152
 
148 153
         return dict(
149 154
             current_user=loCurrentUser,