From 983baad53e5c8af36bfb700ec06261b5ee0e9a08 Mon Sep 17 00:00:00 2001 From: Mauricio Giacomini Girardello <mgg12@inf.ufpr.br> Date: Tue, 5 Apr 2016 09:52:04 -0300 Subject: [PATCH] change create permission for users --- app/policies/user_policy.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/policies/user_policy.rb b/app/policies/user_policy.rb index 9e4a7612..22f65f2e 100644 --- a/app/policies/user_policy.rb +++ b/app/policies/user_policy.rb @@ -1,12 +1,12 @@ class UserPolicy < ApplicationPolicy include FollowablePolicy - def show? - record if user_exists? + def create? + user.is_admin? end - def list? - record + def show? + record if user_exists? end end -- GitLab