diff --git a/addons/cetmix_tower_server/security/cx_tower_plan_security.xml b/addons/cetmix_tower_server/security/cx_tower_plan_security.xml new file mode 100644 index 0000000..22b4034 --- /dev/null +++ b/addons/cetmix_tower_server/security/cx_tower_plan_security.xml @@ -0,0 +1,90 @@ + + + + + Plan: User read + + + + ["&", + ("access_level", "=", "1"), + "|", + ("user_ids", "in", [user.id]), + ("server_ids.user_ids", "in", [user.id]) + ] + + + + + + + + + + Plan: 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]) + ] + + + + + + + + + + Plan: Manager write & create + + + + ["&", ("access_level", "<=", "2"), ("manager_ids", "in", [user.id])] + + + + + + + + + + Plan: Manager unlink + + + + [ + ("access_level", "<=", "2"), + ("create_uid", "=", user.id), + ("manager_ids", "in", [user.id]) + ] + + + + + + + + + + Plan: Root unrestricted access + + + [(1, '=', 1)] + +