X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2f9291ba5764fe104264ae7e3b6a361e11212e8b..54164f6cc6c479e4dca0a717361b0850ba91f425:/app/controllers/user_roles_controller.rb diff --git a/app/controllers/user_roles_controller.rb b/app/controllers/user_roles_controller.rb index fe4c855e3..cf5b4de9e 100644 --- a/app/controllers/user_roles_controller.rb +++ b/app/controllers/user_roles_controller.rb @@ -41,7 +41,7 @@ class UserRolesController < ApplicationController ## # checks that the user doesn't already have this role def not_in_role - if @user.has_role? @role + if @user.role? @role flash[:error] = t("user_role.filter.already_has_role", :role => @role) redirect_to user_path(@user) end @@ -50,7 +50,7 @@ class UserRolesController < ApplicationController ## # checks that the user already has this role def in_role - unless @user.has_role? @role + unless @user.role? @role flash[:error] = t("user_role.filter.doesnt_have_role", :role => @role) redirect_to user_path(@user) end