diff options
author | Azul <azul@leap.se> | 2013-12-13 14:10:41 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-12-13 14:10:41 +0100 |
commit | 5ed00a63ea3da98e8dfaef88752f8afe851c81e9 (patch) | |
tree | 289200f264179c7da6412fe39f1827a53e899d01 /users/app/views | |
parent | b7db3e8f5d9a65ff3b83316bdd802dd40111c64d (diff) |
make the possible actions for users and admins configurable
with tests
Diffstat (limited to 'users/app/views')
-rw-r--r-- | users/app/views/users/_edit.html.haml | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/users/app/views/users/_edit.html.haml b/users/app/views/users/_edit.html.haml index b52da3d..1d2b68a 100644 --- a/users/app/views/users/_edit.html.haml +++ b/users/app/views/users/_edit.html.haml @@ -1,9 +1,14 @@ -# -# edit user form, used by both show and edit actions. -# - -= render 'change_password' -= render 'change_pgp_key' -= render 'change_service_level' -= render 'destroy_account' - +-# We render a bunch of forms here. Which we use depends upon config settings +-# user_actions and admin_actions. They both include an array of actions +-# allowed to users and admins. +-# Possible forms are: +-# 'change_password' +-# 'change_pgp_key' +-# 'change_service_level' +-# 'destroy_account' +- actions = APP_CONFIG[admin? ? :admin_actions : :user_actions] || [] +- actions.each do |action| + = render action |