ish_manager 0.1.8.206 → 0.1.8.207
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1af4799b090fc634e74b7605e890cdb48c5943eefda72c678a1776d69a0ba0c8
|
4
|
+
data.tar.gz: 2fafcf153b594790bccc35deea8306c593928087d3d886a3ee69dc625eba6d15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abd3153488ee26001cf517dc150f5e97935d4478f694fc0884fb08ece79b8b25ac97a52d2e53c7bb654a20fc24247a9d6460265dd7107780cdf1738ae45068ec
|
7
|
+
data.tar.gz: ddf55012e848280194221981aa739274133f7e92529ebde2d32c67bbd9d9ee290b4d3222663519f81e9a5325a2e3306235cb26f023a74893de984effbb20b3ef
|
@@ -3,7 +3,7 @@ class IshManager::CitiesController < IshManager::ApplicationController
|
|
3
3
|
before_action :sett_city, :only => [ :show, :edit ]
|
4
4
|
|
5
5
|
def index
|
6
|
-
authorize! :
|
6
|
+
authorize! :index, City
|
7
7
|
@cities = City.all
|
8
8
|
@city = City.new
|
9
9
|
@photo = Photo.new
|
@@ -60,7 +60,7 @@ class IshManager::CitiesController < IshManager::ApplicationController
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def change_profile_pic
|
63
|
-
authorize! :
|
63
|
+
authorize! :update, City
|
64
64
|
@city = City.find params[:id]
|
65
65
|
@photo = Photo.new params[:photo]
|
66
66
|
@photo.user = @current_user
|
@@ -18,18 +18,17 @@ class IshManager::Ability
|
|
18
18
|
|
19
19
|
can [ :home ], ::IshManager::Ability
|
20
20
|
|
21
|
-
can [ :friends_index, :friends_new ], ::IshModels::UserProfile
|
22
|
-
|
23
21
|
#
|
24
|
-
# role admin
|
22
|
+
# role admin
|
25
23
|
#
|
26
|
-
if user.profile && [ :admin
|
24
|
+
if user.profile && [ :admin ].include?( user.profile.role_name )
|
27
25
|
|
28
26
|
can [ :create_newsitem, :show, :new_feature, :create_feature,
|
29
27
|
:index, :new, :create, :edit, :update ], City
|
30
28
|
can [ :manage ], ::CoTailors
|
31
29
|
|
32
30
|
can [ :new ], ::Feature
|
31
|
+
can [ :friends_index, :friends_new ], ::IshModels::UserProfile
|
33
32
|
|
34
33
|
can [ :index, :new, :create, :create_photo ], ::Gallery
|
35
34
|
can [ :edit, :update ], ::Gallery do |g|
|
@@ -59,6 +58,15 @@ class IshManager::Ability
|
|
59
58
|
|
60
59
|
end
|
61
60
|
|
61
|
+
#
|
62
|
+
# role manager
|
63
|
+
#
|
64
|
+
if user.profile && :manager == user.profile.role_name
|
65
|
+
can [ :create_newsitem, :show, :new_feature, :create_feature,
|
66
|
+
:index, :new, :create, :edit, :update ], City
|
67
|
+
end
|
68
|
+
|
69
|
+
|
62
70
|
#
|
63
71
|
# role guy (and manager)
|
64
72
|
#
|
@@ -72,9 +80,9 @@ class IshManager::Ability
|
|
72
80
|
gallery.shared_profiles.include? user.profile
|
73
81
|
end
|
74
82
|
|
75
|
-
can [ :index ], ::Report
|
83
|
+
# can [ :index ], ::Report
|
76
84
|
|
77
|
-
can [ :index ], ::Video
|
85
|
+
# can [ :index ], ::Video
|
78
86
|
|
79
87
|
end
|
80
88
|
|