ish_manager 0.1.8.228 → 0.1.8.229

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
  SHA256:
3
- metadata.gz: 0bcf03d88d7f1af8455dc7bc3ce17fce365eeb95d9fbc7ed16168122557035dc
4
- data.tar.gz: 61ddd32c62730cb184b02f859247ad1e9c147fd6b7d7d9e71ad9740c809b01e1
3
+ metadata.gz: 9be117fe6d2f6a0cd5133bd15e0e1fef949bae677cd964f43a3321d1f7d729f2
4
+ data.tar.gz: 3b66ca0da2b1c935204eed4376e986959c259cbf786fb5318942c56efd09d480
5
5
  SHA512:
6
- metadata.gz: 400f1b581a783e233e6fb37e26a19c4945b411992a7b5ed8634d3db44770a79122d2f2c29e889b6f6cc7c0b6a4865fedbeeb874d399e18b77531d2698a6b637f
7
- data.tar.gz: 984e51434aff689569fc61dd2b1a64135c95215313d5955637a848b8f4c58a452ee061860056b5f52182ddc67faddf3d1f7e821d393d615fede7b11d358f23af
6
+ metadata.gz: df98c52939e5d91092bad302958365da1dc137cf191bbd75b1dec8aaa13474372f3967e749b99eade069cbddac35303dc6c36f867b2a4999bde18ea083f436a6
7
+ data.tar.gz: b93bd28f89c76950137c0710f58a60123a1f8177cb390039c430c35a72ae6d292747a33343b86c1747d295a7cc68133943ade3c7b5d757aa3a63f68737772a67
@@ -63,7 +63,7 @@ module IshManager
63
63
  end
64
64
  # redirect_to resource_path( @resource )
65
65
  end
66
-
66
+
67
67
  def resource_path resource
68
68
  case resource.class.name
69
69
  when 'City'
@@ -1,5 +1,11 @@
1
+
1
2
  class IshManager::SitesController < IshManager::ApplicationController
2
-
3
+
4
+ ## params:
5
+ ## :domain, :lang, :title, :subhead, :description, :homepage_layout, :layout,
6
+ ## :n_features, :n_newsitems, :newsitems_per_page, :is_trash, :is_ads_enabled,
7
+ ## :is_private, :play_videos_in_preview, :private_user_emails,
8
+
3
9
  def index
4
10
  authorize! :sites_index, ::Manager
5
11
  @site_groups = Site.where( :is_trash => false ).order_by( :lang => :desc ).group_by {|s|s.domain}
@@ -26,14 +32,15 @@ class IshManager::SitesController < IshManager::ApplicationController
26
32
  @site = Site.unscoped.find params[:id]
27
33
  authorize! :update, @site
28
34
  end
29
-
35
+
30
36
  def new
31
- authorize! :new, Site.new
32
37
  @site = Site.new
38
+ authorize! :new, @site
33
39
  end
34
40
 
35
41
  def create
36
42
  authorize! :create, Site.new
43
+ params[:site][:private_user_emails] = params[:site][:private_user_emails].gsub(/\s+/m, ' ').strip.split(" ") if params[:site][:private_user_emails]
37
44
  @site = Site.new params[:site].permit!
38
45
  if @site.save
39
46
  flash[:notice] = 'Success'
@@ -46,7 +53,7 @@ class IshManager::SitesController < IshManager::ApplicationController
46
53
  def update
47
54
  @site = Site.unscoped.find params[:id]
48
55
  authorize! :update, @site
49
-
56
+
50
57
  params[:site][:private_user_emails] = params[:site][:private_user_emails].gsub(/\s+/m, ' ').strip.split(" ")
51
58
 
52
59
  if @site.update_attributes params[:site].permit!
@@ -57,9 +64,9 @@ class IshManager::SitesController < IshManager::ApplicationController
57
64
  redirect_to sites_path
58
65
  end
59
66
 
60
- def newsitem_delete
67
+ def newsitem_delete
61
68
  @site = Site.find params[:site_id]
62
- authorize! :update, @site
69
+ authorize! :update, @site
63
70
  n = @site.newsitems.find( params[:newsitem_id] )
64
71
  n.delete
65
72
  @site.touch
@@ -8,7 +8,7 @@ class IshManager::Ability
8
8
  # signed in user
9
9
  #
10
10
  unless user.blank?
11
-
11
+
12
12
  #
13
13
  # only sudoer... total power
14
14
  #
@@ -17,7 +17,7 @@ class IshManager::Ability
17
17
  end
18
18
 
19
19
  can [ :home ], ::IshManager::Ability
20
-
20
+
21
21
  #
22
22
  # role admin
23
23
  #
@@ -34,7 +34,7 @@ class IshManager::Ability
34
34
  can [ :edit, :update ], ::Gallery do |g|
35
35
  !g.is_trash && ( g.is_public || g.user_profile == user.profile )
36
36
  end
37
-
37
+
38
38
  can [ :cities_index, :home, :sites_index ], ::Manager
39
39
 
40
40
  can [ :new ], Newsitem
@@ -44,7 +44,7 @@ class IshManager::Ability
44
44
  !g.is_trash && ( g.is_public || g.user_profile == user.profile )
45
45
  end
46
46
 
47
- can [ :show, :edit, :update, :create_newsitem, :new_feature, :create_feature, :newsitems_index ], ::Site do |site|
47
+ can [ :new, :show, :edit, :update, :create_newsitem, :new_feature, :create_feature, :newsitems_index ], ::Site do |site|
48
48
  !site.is_private && !site.is_trash
49
49
  end
50
50
  can [ :manage ], Ish::StockWatch
@@ -85,15 +85,16 @@ class IshManager::Ability
85
85
  # can [ :index ], ::Report
86
86
 
87
87
  # can [ :index ], ::Video
88
-
88
+
89
89
  end
90
90
 
91
91
  end
92
+
92
93
  #
93
94
  # anonymous user
94
95
  #
95
96
  user ||= ::User.new
96
-
97
+
97
98
  can [ :show ], ::Gallery do |gallery|
98
99
  gallery.is_public
99
100
  end
@@ -101,6 +102,6 @@ class IshManager::Ability
101
102
  can [ :show ], ::Report do |report|
102
103
  report.is_public
103
104
  end
104
-
105
+
105
106
  end
106
107
  end
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.228
4
+ version: 0.1.8.229
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-26 00:00:00.000000000 Z
11
+ date: 2021-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails