ishapi 0.1.8.3 → 0.1.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c643f203579bcbdf41c77cf5e202eec91e8af51
4
- data.tar.gz: 19de17af1dda30840deed5c0f4681a4fdbb3614d
3
+ metadata.gz: 3c5dfeefff4128e28733eed1b4a5ab36e0be3af0
4
+ data.tar.gz: 6df2a4a524b940d35acce60932477b0451e92e93
5
5
  SHA512:
6
- metadata.gz: 50a00516dbd32ea4105e63956a06b171fb7b5a5ee783acbc99222291447233f1916143243504fbf4e46ce9658b111413b2be5c1dcb8db1aadf5cb5d612c021f6
7
- data.tar.gz: 832bcba2ccad812ea594b52035e1c209a83a83148a839ae1b14ae51153ab7abbf212b70cd6bd40bfcc93ef4dd557f0198f0669dca8c11b5e0148c653a31ef6d5
6
+ metadata.gz: 8efc3aeef2cdc8a0d73e3c3c72e5fea6b8314138097017a0a213fceb75654071cac38c7c572375728c7e1f838f7892e20b383b67f350404f123ce0bfa32c528a
7
+ data.tar.gz: 662f99590c655d150d074a1ee94f2b739a574992fe4b342d28cdc59d9071d187e9c3f283ee031023ef382ce10db140febc3c0438d850af76ca7d7991837973a2
@@ -5,11 +5,13 @@ module Ishapi
5
5
  class CitiesController < ApplicationController
6
6
 
7
7
  def index
8
+ authorize! :index, City
8
9
  @cities = City.all
9
10
  end
10
11
 
11
12
  def show
12
13
  @city = City.find_by :cityname => params[:cityname]
14
+ authorize! :show, @city
13
15
  end
14
16
 
15
17
  end
@@ -3,6 +3,7 @@ module Ishapi
3
3
  class SitesController < ApplicationController
4
4
 
5
5
  def index
6
+ authorize! :index, ::Site
6
7
  @sites = ::Site.all
7
8
  end
8
9
 
@@ -13,6 +14,8 @@ module Ishapi
13
14
  domain = params[:domain]
14
15
  end
15
16
  @site = ::Site.find_by :domain => domain, :lang => :en
17
+ authorize! :show, @site
18
+
16
19
  @newsitems = @site.newsitems.limit(10)
17
20
  end
18
21
 
@@ -19,6 +19,8 @@ class Ishapi::Ability
19
19
 
20
20
  end
21
21
  user ||= User.new
22
+
23
+ can [ :index, :show ], City
22
24
 
23
25
  can [ :read ], Gallery do |gallery|
24
26
  gallery.is_public
@@ -30,5 +32,7 @@ class Ishapi::Ability
30
32
 
31
33
  can [ :welcome_home ], Ishapi
32
34
 
35
+ can [ :index, :show ], Site
36
+
33
37
  end
34
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ishapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.3
4
+ version: 0.1.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-27 00:00:00.000000000 Z
11
+ date: 2017-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails