|
@@ -163,49 +163,55 @@ Functions
|
|
|
Optionally, a dictionary of *callbacks* can be defined with as key the operation that is being executed, and value the actual callback.
|
|
|
The callbacks must be similarly defined just like how they were defined in the individual *transformation_execute* operations.
|
|
|
|
|
|
-.. function:: permission_modify()
|
|
|
+.. function:: permission_modify(model_name, permissions)
|
|
|
|
|
|
- Expl
|
|
|
+ Change the permissions of *model_name* to *permissions*.
|
|
|
+ The permissions is a string of three characters, each between 0 and 2.
|
|
|
+ The format is similar to the UNIX permission system: the leftmost character is the permission for the owning user, the middle character for members of the ownin group, and the rightmost character for all other users.
|
|
|
+ Character 0 signifies no access, 1 read-only access, and 2 full read/write access.
|
|
|
|
|
|
-.. function:: permission_owner()
|
|
|
+.. function:: permission_owner(model_name, owner)
|
|
|
|
|
|
- Expl
|
|
|
+ Change the owner of the model *model_name* to *owner*.
|
|
|
|
|
|
-.. function:: permission_group()
|
|
|
+.. function:: permission_group(model_name, group)
|
|
|
|
|
|
- Expl
|
|
|
+ Change the owning group of the model *model_name* to *group*.
|
|
|
|
|
|
-.. function:: group_create()
|
|
|
+.. function:: group_create(group_name)
|
|
|
|
|
|
- Expl
|
|
|
+ Create a new group named *group_name*.
|
|
|
|
|
|
-.. function:: group_delete()
|
|
|
+.. function:: group_delete(group_name)
|
|
|
|
|
|
- Expl
|
|
|
+ Delete the group named *group_name*.
|
|
|
|
|
|
-.. function:: group_owner_add()
|
|
|
+.. function:: group_owner_add(group_name, user_name)
|
|
|
|
|
|
- Expl
|
|
|
+ Add user *user_name* as an owner of group *group_name*.
|
|
|
+ This automatically makes the user join the specified group if this was not yet the case.
|
|
|
|
|
|
-.. function:: group_owner_delete()
|
|
|
+.. function:: group_owner_delete(group_name, user_name)
|
|
|
|
|
|
- Expl
|
|
|
+ Remove user *user_name* as an owner of group *group_name*.
|
|
|
|
|
|
-.. function:: group_join()
|
|
|
+.. function:: group_join(group_name, user_name)
|
|
|
|
|
|
- Expl
|
|
|
+ Have user *user_name* join the group *group_name* as an ordinary user.
|
|
|
|
|
|
-.. function:: group_kick()
|
|
|
+.. function:: group_kick(group_name, user_name)
|
|
|
|
|
|
- Expl
|
|
|
+ Remove user *user_name* from the group *group_name*.
|
|
|
+ If the user was an owner of the group, these permissions are also revoked.
|
|
|
|
|
|
-.. function:: admin_promote()
|
|
|
+.. function:: admin_promote(user_name)
|
|
|
|
|
|
- Expl
|
|
|
+ Promote user *user_name* to admin status.
|
|
|
+ Admin status grants users access to all operations.
|
|
|
|
|
|
-.. function:: admin_demote()
|
|
|
+.. function:: admin_demote(user_name)
|
|
|
|
|
|
- Expl
|
|
|
+ Demote user *user_name* to ordinary user.
|
|
|
|
|
|
.. function:: element_list(model_name)
|
|
|
|