diff --git a/addons/cetmix_tower_server/security/cx_tower_command_security.xml b/addons/cetmix_tower_server/security/cx_tower_command_security.xml new file mode 100644 index 0000000..2903c82 --- /dev/null +++ b/addons/cetmix_tower_server/security/cx_tower_command_security.xml @@ -0,0 +1,84 @@ + + + + + Command: User read + + + + ["&", + ("access_level", "=", "1"), + "|", + ("user_ids", "in", [user.id]), + ("server_ids.user_ids", "in", [user.id]) + ] + + + + + + + + + + Command: Manager read + + + + ["&", + ("access_level", "<=", "2"), + "|", + "|", ("user_ids", "in", [user.id]), ("manager_ids", "in", [user.id]), + "|", + ("server_ids", "=", False), + "|", + ("server_ids.user_ids", "in", [user.id]), + ("server_ids.manager_ids", "in", [user.id]) + ] + + + + + + + + + + Command: Manager write & create + + + + [("access_level", "<=", "2"), ("manager_ids", "in", [user.id])] + + + + + + + + + + Command: Manager unlink + + + + [ + ("access_level", "<=", "2"), + ("create_uid", "=", user.id), + ("manager_ids", "in", [user.id]) + ] + + + + + + + + + + Command: Root unrestricted access + + + [(1, '=', 1)] + +