ish_manager 0.1.8.6 → 0.1.8.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c1dbbdc72abebe1801a1ed0f0ad4c1cd0d012a8
4
- data.tar.gz: 4d215e4523c6094525cae0d567861827fac06d67
3
+ metadata.gz: b23b94a2f137e5e597716c3f33943abf32960ab6
4
+ data.tar.gz: 612d34737e9ab14190c84224a7bdda00de3f0d2d
5
5
  SHA512:
6
- metadata.gz: 63a67f156ff7747665b7eef38775bd69e8b2f12c91fd2f7f201d9a195b62af8a70e3c89d79082e376376e7f428abecabbb73569d39ee6de4795b3fad86cf4283
7
- data.tar.gz: cd606600e44bd05dff0d6c3d206a2234ce7b532f7c1ad86812a9ee4a85ca6808f25a366e3ec213a247ebc26974e6ea6f052d967e3f0c93bd2c009029bb484b17
6
+ metadata.gz: 4d2ecce256a176807daf1364e070dad8d5df1616ef28bd86391421465f72744b9d9ef53325a70994221b2f0866e2ed847d086aae113ac2b338175fb6c0f6e61f
7
+ data.tar.gz: add6e01889fc56af6e671c3a123a88986cebcefe81bad112c845b20f82f11e095d11de20cdfefcc77ca1d83e46b55b1ba584356bc2ceab2e4218b70cfdbb2391
@@ -67,6 +67,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
67
67
 
68
68
  def destroy
69
69
  @gallery = Gallery.unscoped.find params[:id]
70
+ authorize! :destroy, @gallery
70
71
  @gallery.is_trash = true
71
72
  @gallery.save
72
73
  flash[:notice] = 'Logically deleted gallery.'
@@ -14,7 +14,7 @@ class IshManager::PhotosController < IshManager::ApplicationController
14
14
  authorize! :destroy, @photo
15
15
  @photo.is_trash = true
16
16
  @photo.save
17
- redirect_to request.referrer
17
+ redirect_to request.referrer || root_path
18
18
  end
19
19
 
20
20
  def show
@@ -11,21 +11,22 @@ class IshManager::Ability
11
11
 
12
12
  if user.profile && user.profile.manager?
13
13
  can :manage, :all
14
- can [ :home ], Manager
14
+ can [ :home ], ::Manager
15
+ can :destroy, ::Photo
15
16
  end
16
17
 
17
- can [ :show ], Gallery do |gallery|
18
+ can [ :show ], ::Gallery do |gallery|
18
19
  gallery.user == user
19
20
  end
20
21
 
21
22
  end
22
23
  user ||= ::User.new
23
24
 
24
- can [ :read ], Gallery do |gallery|
25
+ can [ :read ], ::Gallery do |gallery|
25
26
  gallery.is_public
26
27
  end
27
28
 
28
- can [ :read ], Report do |report|
29
+ can [ :read ], ::Report do |report|
29
30
  report.is_public
30
31
  end
31
32
 
@@ -0,0 +1,23 @@
1
+
2
+ development: &id1
3
+ clients:
4
+ default:
5
+ database: ish_development
6
+ hosts:
7
+ - 127.0.0.1
8
+ development_cached: *id1
9
+ development_production: *id1
10
+
11
+ test:
12
+ clients:
13
+ default:
14
+ database: ish_test
15
+ hosts:
16
+ - 127.0.0.1
17
+
18
+ production:
19
+ clients:
20
+ default:
21
+ database: ish_development
22
+ hosts:
23
+ - 127.0.0.1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.6
4
+ version: 0.1.8.7
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-28 00:00:00.000000000 Z
11
+ date: 2017-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -222,6 +222,7 @@ files:
222
222
  - app/views/ish_manager/videos/_index.haml
223
223
  - app/views/layouts/ish_manager/application.haml
224
224
  - app/views/layouts/ish_manager/application.haml~
225
+ - config/mongoid.yml
225
226
  - config/routes.rb
226
227
  - lib/ish_manager.rb
227
228
  - lib/ish_manager/engine.rb