浏览代码

fixed current_user_rights

sferot 11 年前
父节点
当前提交
82afec4dde
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      pboard/pboard/controllers/root.py

+ 6 - 1
pboard/pboard/controllers/root.py 查看文件

143
 
143
 
144
         user_specific_group_rights = pld.PODStaticController.getUserDedicatedGroupRightsOnNode(loCurrentNode)
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
         return dict(
153
         return dict(
149
             current_user=loCurrentUser,
154
             current_user=loCurrentUser,