summaryrefslogtreecommitdiff
path: root/app/models/ability.rb
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-24 15:37:24 +0100
committerspag <spag@golwen.net>2013-01-24 15:37:24 +0100
commit99270421d02b3ac77bf111bbde62a2ef80f8e114 (patch)
tree6ddb8328729e53dcc7a605040cd7aece622d0e5a /app/models/ability.rb
parent5f5ea1d06686ec5cd31cf8b9db177191fa7e66fd (diff)
parent2d6ebf19e5cea45dd714f92a64b1b81e1200a811 (diff)
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r--app/models/ability.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb
index b846af0..0d13dab 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -82,6 +82,10 @@ class Ability
#
cannot [:create, :destroy], GsParameter
cannot [:create, :destroy], GuiFunction
+
+ # An admin can not destroy his/her account
+ #
+ cannot [:destroy], User, :id => user.id
else
# Any user can do the following stuff.
#