[openstreetmap/openstreetmap-website] Revoking administrator role on current user should fail (#1701)

mmd notifications at github.com
Tue Dec 19 15:42:29 UTC 2017

mmd-osm commented on this pull request.

> @@ -8,6 +8,7 @@ class UserRolesController < ApplicationController
   before_action :require_valid_role
   before_action :not_in_role, :only => [:grant]
   before_action :in_role, :only => [:revoke]
+  before_action :not_revoke_admin_current_user

Good point, I moved the check to the `revoke` method now.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20171219/21de3afb/attachment.html>

More information about the rails-dev mailing list