[openstreetmap/openstreetmap-website] Initial cut at authorization patterns (#1904)

mmd notifications at github.com
Mon Oct 8 19:45:42 UTC 2018


mmd-osm commented on this pull request.



> +# 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, :welcome], :site
+
+    can [:list, :rss, :view, :comments], DiaryEntry
+
+    can [:search, :search_latlon, :search_ca_postcode, :search_osm_nominatim,
+         :search_geonames, :search_osm_nominatim_reverse, :search_geonames_reverse], :geocoder
+
+    if user
+      can :weclome, :site

Typo?

-- 
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/1904#pullrequestreview-162614094
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20181008/f0a35ea8/attachment.html>


More information about the rails-dev mailing list