[openstreetmap/openstreetmap-website] WIP: Move to CanCanCan for authorization (#2023)
Andy Allan
notifications at github.com
Wed Oct 17 11:45:50 UTC 2018
gravitystorm commented on this pull request.
> @@ -0,0 +1,57 @@
+# frozen_string_literal: true
+
+class Ability
+ include CanCan::Ability
+
+ def initialize(user)
+ can :index, :site
+ can [:permalink, :edit, :help, :fixthemap, :offline, :export, :about, :preview, :copyright, :key, :id], :site
I'll merge these, good spot. The symbol usage and `class => false` is from https://github.com/CanCanCommunity/cancancan/wiki/Non-RESTful-Controllers
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2023#discussion_r225890028
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20181017/41741f6a/attachment.html>
More information about the rails-dev
mailing list