Quellcode durchsuchen

fixed current_user_rights

sferot vor 11 Jahren
Ursprung
Commit
82afec4dde
1 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen
  1. 6 1
      pboard/pboard/controllers/root.py

+ 6 - 1
pboard/pboard/controllers/root.py Datei anzeigen

@@ -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,