solidus_user_roles 2.0.0
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 +7 -0
- data/.circleci/config.yml +73 -0
- data/.gem_release.yml +5 -0
- data/.github/stale.yml +1 -0
- data/.github_changelog_generator +2 -0
- data/.gitignore +21 -0
- data/.rspec +2 -0
- data/.rubocop.yml +5 -0
- data/CHANGELOG.md +1 -0
- data/Gemfile +39 -0
- data/LICENSE +26 -0
- data/README.md +83 -0
- data/Rakefile +6 -0
- data/app/controllers/spree/admin/roles_controller.rb +8 -0
- data/app/decorators/models/solidus_user_roles/spree/role_decorator.rb +26 -0
- data/app/models/spree/permission_set.rb +11 -0
- data/app/models/spree/permission_sets/role_management.rb +35 -0
- data/app/models/spree/role_permission.rb +8 -0
- data/app/overrides/user_sub_menu.rb +13 -0
- data/app/views/spree/admin/roles/_form.html.erb +38 -0
- data/app/views/spree/admin/roles/edit.html.erb +19 -0
- data/app/views/spree/admin/roles/index.html.erb +54 -0
- data/app/views/spree/admin/roles/new.html.erb +23 -0
- data/bin/console +17 -0
- data/bin/rails +7 -0
- data/bin/rails-engine +13 -0
- data/bin/rails-sandbox +16 -0
- data/bin/rake +7 -0
- data/bin/sandbox +78 -0
- data/bin/setup +8 -0
- data/config/locales/en.yml +16 -0
- data/config/routes.rb +7 -0
- data/db/migrate/20160406142441_create_spree_permission_sets.rb +9 -0
- data/db/migrate/20160406142933_create_spree_roles_permissions.rb +9 -0
- data/db/seeds.rb +5 -0
- data/lib/generators/solidus_user_roles/install/install_generator.rb +31 -0
- data/lib/generators/solidus_user_roles/install/templates/initializer.rb +6 -0
- data/lib/solidus_user_roles/configuration.rb +21 -0
- data/lib/solidus_user_roles/engine.rb +44 -0
- data/lib/solidus_user_roles/testing_support/factories.rb +8 -0
- data/lib/solidus_user_roles/version.rb +5 -0
- data/lib/solidus_user_roles.rb +5 -0
- data/lib/tasks/load_seeds.rake +10 -0
- data/solidus_user_roles.gemspec +37 -0
- data/spec/controllers/spree/admin/roles_controller_spec.rb +82 -0
- data/spec/models/spree/permission_set_spec.rb +7 -0
- data/spec/models/spree/role_permission_spec.rb +6 -0
- data/spec/models/spree/role_spec.rb +45 -0
- data/spec/spec_helper.rb +28 -0
- data/spec/support/shoulda.rb +8 -0
- metadata +165 -0
data/bin/sandbox
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
set -e
|
4
|
+
test -z "${DEBUG+empty_string}" || set -x
|
5
|
+
|
6
|
+
test "$DB" = "sqlite" && export DB="sqlite3"
|
7
|
+
|
8
|
+
if [ -z "$SOLIDUS_BRANCH" ]
|
9
|
+
then
|
10
|
+
echo "~~> Use 'export SOLIDUS_BRANCH=[main|v3.2|...]' to control the Solidus branch"
|
11
|
+
SOLIDUS_BRANCH="main"
|
12
|
+
fi
|
13
|
+
echo "~~> Using branch $SOLIDUS_BRANCH of solidus"
|
14
|
+
|
15
|
+
if [ -z "$SOLIDUS_FRONTEND" ]
|
16
|
+
then
|
17
|
+
echo "~~> Use 'export SOLIDUS_FRONTEND=[solidus_frontend|solidus_starter_frontend]' to control the Solidus frontend"
|
18
|
+
SOLIDUS_FRONTEND="solidus_frontend"
|
19
|
+
fi
|
20
|
+
echo "~~> Using branch $SOLIDUS_FRONTEND as the solidus frontend"
|
21
|
+
|
22
|
+
extension_name="solidus_user_roles"
|
23
|
+
|
24
|
+
# Stay away from the bundler env of the containing extension.
|
25
|
+
function unbundled {
|
26
|
+
ruby -rbundler -e'b = proc {system *ARGV}; Bundler.respond_to?(:with_unbundled_env) ? Bundler.with_unbundled_env(&b) : Bundler.with_clean_env(&b)' -- $@
|
27
|
+
}
|
28
|
+
|
29
|
+
rm -rf ./sandbox
|
30
|
+
unbundled bundle exec rails new sandbox \
|
31
|
+
--database="${DB:-sqlite3}" \
|
32
|
+
--skip-bundle \
|
33
|
+
--skip-git \
|
34
|
+
--skip-keeps \
|
35
|
+
--skip-rc \
|
36
|
+
--skip-spring \
|
37
|
+
--skip-test \
|
38
|
+
--skip-javascript
|
39
|
+
|
40
|
+
if [ ! -d "sandbox" ]; then
|
41
|
+
echo 'sandbox rails application failed'
|
42
|
+
exit 1
|
43
|
+
fi
|
44
|
+
|
45
|
+
cd ./sandbox
|
46
|
+
cat <<RUBY >> Gemfile
|
47
|
+
gem 'solidus', github: 'solidusio/solidus', branch: '$SOLIDUS_BRANCH'
|
48
|
+
gem 'rails-i18n'
|
49
|
+
gem 'solidus_i18n'
|
50
|
+
|
51
|
+
gem '$extension_name', path: '..'
|
52
|
+
|
53
|
+
group :test, :development do
|
54
|
+
platforms :mri do
|
55
|
+
gem 'pry-byebug'
|
56
|
+
end
|
57
|
+
end
|
58
|
+
RUBY
|
59
|
+
|
60
|
+
unbundled bundle install --gemfile Gemfile
|
61
|
+
|
62
|
+
unbundled bundle exec rake db:drop db:create
|
63
|
+
|
64
|
+
unbundled bundle exec rails generate solidus:install \
|
65
|
+
--auto-accept \
|
66
|
+
--user_class=Spree::User \
|
67
|
+
--enforce_available_locales=true \
|
68
|
+
--with-authentication=true \
|
69
|
+
--payment-method=none \
|
70
|
+
--frontend=${SOLIDUS_FRONTEND} \
|
71
|
+
$@
|
72
|
+
|
73
|
+
unbundled bundle exec rails generate solidus:auth:install --auto-run-migrations
|
74
|
+
unbundled bundle exec rails generate ${extension_name}:install --auto-run-migrations
|
75
|
+
|
76
|
+
echo
|
77
|
+
echo "🚀 Sandbox app successfully created for $extension_name!"
|
78
|
+
echo "🧪 This app is intended for test purposes."
|
data/bin/setup
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Sample localization file for English. Add more files in this directory for other locales.
|
2
|
+
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
3
|
+
|
4
|
+
en:
|
5
|
+
hello: "Hello world"
|
6
|
+
spree:
|
7
|
+
new_user_role: New User Role
|
8
|
+
back_to_roles_list: Back to Roles List
|
9
|
+
permissions: Permissions
|
10
|
+
user_roles: User Roles
|
11
|
+
editing_user_role: Editing User Role
|
12
|
+
display_permissions: Display Permissions
|
13
|
+
management_permissions: Management Permissions
|
14
|
+
admin:
|
15
|
+
tab:
|
16
|
+
roles: Roles
|
data/config/routes.rb
ADDED
data/db/seeds.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SolidusUserRoles
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < Rails::Generators::Base
|
6
|
+
class_option :auto_run_migrations, type: :boolean, default: false
|
7
|
+
source_root File.expand_path('templates', __dir__)
|
8
|
+
|
9
|
+
def self.exit_on_failure?
|
10
|
+
true
|
11
|
+
end
|
12
|
+
|
13
|
+
def copy_initializer
|
14
|
+
template 'initializer.rb', 'config/initializers/solidus_user_roles.rb'
|
15
|
+
end
|
16
|
+
|
17
|
+
def add_migrations
|
18
|
+
run 'bin/rails railties:install:migrations FROM=solidus_user_roles'
|
19
|
+
end
|
20
|
+
|
21
|
+
def run_migrations
|
22
|
+
run_migrations = options[:auto_run_migrations] || ['', 'y', 'Y'].include?(ask('Would you like to run the migrations now? [Y/n]')) # rubocop:disable Layout/LineLength
|
23
|
+
if run_migrations
|
24
|
+
run 'bin/rails db:migrate'
|
25
|
+
else
|
26
|
+
puts 'Skipping bin/rails db:migrate, don\'t forget to run it!' # rubocop:disable Rails/Output
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SolidusUserRoles
|
4
|
+
class Configuration
|
5
|
+
# Define here the settings for this extension, e.g.:
|
6
|
+
#
|
7
|
+
# attr_accessor :my_setting
|
8
|
+
end
|
9
|
+
|
10
|
+
class << self
|
11
|
+
def configuration
|
12
|
+
@configuration ||= Configuration.new
|
13
|
+
end
|
14
|
+
|
15
|
+
alias config configuration
|
16
|
+
|
17
|
+
def configure
|
18
|
+
yield configuration
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'solidus_core'
|
4
|
+
require 'solidus_support'
|
5
|
+
|
6
|
+
module SolidusUserRoles
|
7
|
+
class Engine < Rails::Engine
|
8
|
+
include SolidusSupport::EngineExtensions
|
9
|
+
|
10
|
+
isolate_namespace ::Spree
|
11
|
+
|
12
|
+
engine_name 'solidus_user_roles'
|
13
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
14
|
+
|
15
|
+
# use rspec for tests
|
16
|
+
config.generators do |g|
|
17
|
+
g.test_framework :rspec
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.load_custom_permissions
|
21
|
+
# Ensure both tables exist before assigning permissions
|
22
|
+
if (ActiveRecord::Base.connection.tables & ['spree_roles', 'spree_permission_sets']).to_a.length == 2
|
23
|
+
::Spree::Role.non_base_roles.each do |role|
|
24
|
+
::Spree::Config.roles.assign_permissions role.name, role.permission_sets_constantized
|
25
|
+
end
|
26
|
+
end
|
27
|
+
rescue ActiveRecord::NoDatabaseError
|
28
|
+
warn "No database available, skipping role configuration"
|
29
|
+
rescue ActiveRecord::StatementInvalid => e
|
30
|
+
warn "Skipping role configuration: #{e.message}"
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.activate
|
34
|
+
Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')).sort.each do |c|
|
35
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
36
|
+
end
|
37
|
+
return if Rails.env.test?
|
38
|
+
|
39
|
+
SolidusUserRoles::Engine.load_custom_permissions
|
40
|
+
end
|
41
|
+
|
42
|
+
config.to_prepare(&method(:activate).to_proc)
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
namespace :solidus_user_roles do
|
4
|
+
desc "Loads seed data."
|
5
|
+
task load_seeds: :environment do
|
6
|
+
Spree::PermissionSets::Base.subclasses.each do |permission|
|
7
|
+
Spree::PermissionSet.find_or_create_by(name: permission.to_s.split('PermissionSets::').last, set: permission.to_s)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/solidus_user_roles/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'solidus_user_roles'
|
7
|
+
spec.version = SolidusUserRoles::VERSION
|
8
|
+
spec.authors = ['Allison Reilly']
|
9
|
+
spec.email = 'acreilly3@gmail.com'
|
10
|
+
|
11
|
+
spec.summary = 'Advanced user roles for Solidus.'
|
12
|
+
spec.description = 'Advanced user roles for Solidus.'
|
13
|
+
spec.homepage = 'http://boomer.digital'
|
14
|
+
spec.license = 'BSD-3-Clause'
|
15
|
+
|
16
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
17
|
+
spec.metadata['source_code_uri'] = 'https://github.com/solidusio-contrib/solidus_user_roles'
|
18
|
+
spec.metadata['changelog_uri'] = 'https://github.com/solidusio-contrib/solidus_user_roles/blob/master/CHANGELOG.md'
|
19
|
+
|
20
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3', '< 4') # rubocop:disable Gemspec/RequiredRubyVersion
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
files = Dir.chdir(__dir__) { `git ls-files -z`.split("\x0") }
|
25
|
+
|
26
|
+
spec.files = files.grep_v(%r{^(test|spec|features)/})
|
27
|
+
spec.test_files = files.grep(%r{^(test|spec|features)/})
|
28
|
+
spec.bindir = "exe"
|
29
|
+
spec.executables = files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
|
+
spec.require_paths = ["lib"]
|
31
|
+
|
32
|
+
spec.add_dependency 'solidus_core', ['>= 3', '< 5']
|
33
|
+
spec.add_dependency 'solidus_support', '~> 0.5'
|
34
|
+
|
35
|
+
spec.add_development_dependency 'shoulda-matchers'
|
36
|
+
spec.add_development_dependency 'solidus_dev_support', '~> 2.6'
|
37
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Spree::Admin::RolesController do
|
4
|
+
stub_authorization!
|
5
|
+
let(:role) { create(:role) }
|
6
|
+
let(:permission_set) { create(:permission_set) }
|
7
|
+
|
8
|
+
describe "#index" do
|
9
|
+
subject { get :index }
|
10
|
+
|
11
|
+
it { is_expected.to be_successful }
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "#new" do
|
15
|
+
subject { get :new }
|
16
|
+
|
17
|
+
it { is_expected.to be_successful }
|
18
|
+
end
|
19
|
+
|
20
|
+
describe "#edit" do
|
21
|
+
subject { get :edit, params: { id: role.id } }
|
22
|
+
|
23
|
+
it { is_expected.to be_successful }
|
24
|
+
end
|
25
|
+
|
26
|
+
describe "#create" do
|
27
|
+
subject(:request) { post :create, params: params }
|
28
|
+
|
29
|
+
let(:params) do
|
30
|
+
{
|
31
|
+
role: {
|
32
|
+
name: "TEST #{rand(10_000)}",
|
33
|
+
permission_set_ids: [permission_set.id]
|
34
|
+
}
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
it { is_expected.to redirect_to(spree.admin_roles_path) }
|
39
|
+
|
40
|
+
it "expect @role to eq the role being updated" do
|
41
|
+
expect(assigns(:role)).to eq(@role) # rubocop:disable RSpec/InstanceVariable
|
42
|
+
end
|
43
|
+
|
44
|
+
it "updates the permission sets" do
|
45
|
+
expect{ request }.to change(Spree::Role, :count).by(1)
|
46
|
+
end
|
47
|
+
|
48
|
+
it "updates the RoleConfiguration" do
|
49
|
+
expect{ request }.to change { Spree::Config.roles.roles.count }.by(1)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe "#update" do
|
54
|
+
subject(:request) { put :update, params: params }
|
55
|
+
|
56
|
+
let(:params) do
|
57
|
+
{
|
58
|
+
id: role.to_param,
|
59
|
+
role: {
|
60
|
+
name: role.name,
|
61
|
+
permission_set_ids: [permission_set.id]
|
62
|
+
}
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
it { is_expected.to redirect_to(spree.admin_roles_path) }
|
67
|
+
|
68
|
+
it "expect @role to eq the role being updated" do
|
69
|
+
expect(assigns(:role)).to eq(@role) # rubocop:disable RSpec/InstanceVariable
|
70
|
+
end
|
71
|
+
|
72
|
+
it "updates the permission sets" do
|
73
|
+
expect{ request }.to change { role.reload.permission_sets.count }.by(1)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe "#destroy" do
|
78
|
+
subject { put :destroy, params: { id: role.to_param } }
|
79
|
+
|
80
|
+
it { is_expected.to have_http_status(:found) }
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Spree::Role, type: :model do
|
4
|
+
let(:role) {
|
5
|
+
role = build(:role)
|
6
|
+
role.permission_sets << create(:permission_set)
|
7
|
+
role
|
8
|
+
}
|
9
|
+
|
10
|
+
it { is_expected.to have_many :role_permissions }
|
11
|
+
it { is_expected.to have_many(:permission_sets).through(:role_permissions) }
|
12
|
+
it { is_expected.to validate_uniqueness_of(:name).ignoring_case_sensitivity }
|
13
|
+
|
14
|
+
describe "#assign_permissions" do
|
15
|
+
it 'creates new Spree::RoleConfiguration::Role' do
|
16
|
+
expect { role.save }.to change { Spree::Config.roles.roles.count }.by(1)
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'updates the existing Spree::RoleConfiguration::Role' do
|
20
|
+
role.save
|
21
|
+
role.permission_sets << create(:permission_set, name: 'test', set: 'Spree::PermissionSets::ProductDisplay')
|
22
|
+
|
23
|
+
expect { role.save }.to change { Spree::Config.roles.roles[role.name].permission_sets.count }.from(1).to(2)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "#destroy" do
|
28
|
+
let(:role) { create(:role) }
|
29
|
+
|
30
|
+
before do
|
31
|
+
role.permission_sets << create(:permission_set)
|
32
|
+
role.save
|
33
|
+
end
|
34
|
+
|
35
|
+
it "destroys all associated role permissions" do
|
36
|
+
role_permission = role.role_permissions.first
|
37
|
+
|
38
|
+
role.destroy
|
39
|
+
aggregate_failures do
|
40
|
+
expect{ described_class.find(role.id) }.to raise_error(ActiveRecord::RecordNotFound)
|
41
|
+
expect{ Spree::RolePermission.find(role_permission.id) }.to raise_error(ActiveRecord::RecordNotFound)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Configure Rails Environment
|
4
|
+
ENV['RAILS_ENV'] = 'test'
|
5
|
+
|
6
|
+
# Run Coverage report
|
7
|
+
require 'solidus_dev_support/rspec/coverage'
|
8
|
+
|
9
|
+
# Create the dummy app if it's still missing.
|
10
|
+
dummy_env = "#{__dir__}/dummy/config/environment.rb"
|
11
|
+
system 'bin/rake extension:test_app' unless File.exist? dummy_env
|
12
|
+
require dummy_env
|
13
|
+
|
14
|
+
# Requires factories and other useful helpers defined in spree_core.
|
15
|
+
require 'solidus_dev_support/rspec/feature_helper'
|
16
|
+
|
17
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
18
|
+
# in spec/support/ and its subdirectories.
|
19
|
+
Dir["#{__dir__}/support/**/*.rb"].sort.each { |f| require f }
|
20
|
+
|
21
|
+
# Requires factories defined in Solidus core and this extension.
|
22
|
+
# See: lib/solidus_user_roles/testing_support/factories.rb
|
23
|
+
SolidusDevSupport::TestingSupport::Factories.load_for(SolidusUserRoles::Engine)
|
24
|
+
|
25
|
+
RSpec.configure do |config|
|
26
|
+
config.infer_spec_type_from_file_location!
|
27
|
+
config.use_transactional_fixtures = false
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: solidus_user_roles
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Allison Reilly
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-05-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: solidus_core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '5'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '5'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: solidus_support
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0.5'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0.5'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: shoulda-matchers
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: solidus_dev_support
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '2.6'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '2.6'
|
75
|
+
description: Advanced user roles for Solidus.
|
76
|
+
email: acreilly3@gmail.com
|
77
|
+
executables: []
|
78
|
+
extensions: []
|
79
|
+
extra_rdoc_files: []
|
80
|
+
files:
|
81
|
+
- ".circleci/config.yml"
|
82
|
+
- ".gem_release.yml"
|
83
|
+
- ".github/stale.yml"
|
84
|
+
- ".github_changelog_generator"
|
85
|
+
- ".gitignore"
|
86
|
+
- ".rspec"
|
87
|
+
- ".rubocop.yml"
|
88
|
+
- CHANGELOG.md
|
89
|
+
- Gemfile
|
90
|
+
- LICENSE
|
91
|
+
- README.md
|
92
|
+
- Rakefile
|
93
|
+
- app/controllers/spree/admin/roles_controller.rb
|
94
|
+
- app/decorators/models/solidus_user_roles/spree/role_decorator.rb
|
95
|
+
- app/models/spree/permission_set.rb
|
96
|
+
- app/models/spree/permission_sets/role_management.rb
|
97
|
+
- app/models/spree/role_permission.rb
|
98
|
+
- app/overrides/user_sub_menu.rb
|
99
|
+
- app/views/spree/admin/roles/_form.html.erb
|
100
|
+
- app/views/spree/admin/roles/edit.html.erb
|
101
|
+
- app/views/spree/admin/roles/index.html.erb
|
102
|
+
- app/views/spree/admin/roles/new.html.erb
|
103
|
+
- bin/console
|
104
|
+
- bin/rails
|
105
|
+
- bin/rails-engine
|
106
|
+
- bin/rails-sandbox
|
107
|
+
- bin/rake
|
108
|
+
- bin/sandbox
|
109
|
+
- bin/setup
|
110
|
+
- config/locales/en.yml
|
111
|
+
- config/routes.rb
|
112
|
+
- db/migrate/20160406142441_create_spree_permission_sets.rb
|
113
|
+
- db/migrate/20160406142933_create_spree_roles_permissions.rb
|
114
|
+
- db/seeds.rb
|
115
|
+
- lib/generators/solidus_user_roles/install/install_generator.rb
|
116
|
+
- lib/generators/solidus_user_roles/install/templates/initializer.rb
|
117
|
+
- lib/solidus_user_roles.rb
|
118
|
+
- lib/solidus_user_roles/configuration.rb
|
119
|
+
- lib/solidus_user_roles/engine.rb
|
120
|
+
- lib/solidus_user_roles/testing_support/factories.rb
|
121
|
+
- lib/solidus_user_roles/version.rb
|
122
|
+
- lib/tasks/load_seeds.rake
|
123
|
+
- solidus_user_roles.gemspec
|
124
|
+
- spec/controllers/spree/admin/roles_controller_spec.rb
|
125
|
+
- spec/models/spree/permission_set_spec.rb
|
126
|
+
- spec/models/spree/role_permission_spec.rb
|
127
|
+
- spec/models/spree/role_spec.rb
|
128
|
+
- spec/spec_helper.rb
|
129
|
+
- spec/support/shoulda.rb
|
130
|
+
homepage: http://boomer.digital
|
131
|
+
licenses:
|
132
|
+
- BSD-3-Clause
|
133
|
+
metadata:
|
134
|
+
homepage_uri: http://boomer.digital
|
135
|
+
source_code_uri: https://github.com/solidusio-contrib/solidus_user_roles
|
136
|
+
changelog_uri: https://github.com/solidusio-contrib/solidus_user_roles/blob/master/CHANGELOG.md
|
137
|
+
post_install_message:
|
138
|
+
rdoc_options: []
|
139
|
+
require_paths:
|
140
|
+
- lib
|
141
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '3'
|
146
|
+
- - "<"
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '4'
|
149
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
154
|
+
requirements: []
|
155
|
+
rubygems_version: 3.3.7
|
156
|
+
signing_key:
|
157
|
+
specification_version: 4
|
158
|
+
summary: Advanced user roles for Solidus.
|
159
|
+
test_files:
|
160
|
+
- spec/controllers/spree/admin/roles_controller_spec.rb
|
161
|
+
- spec/models/spree/permission_set_spec.rb
|
162
|
+
- spec/models/spree/role_permission_spec.rb
|
163
|
+
- spec/models/spree/role_spec.rb
|
164
|
+
- spec/spec_helper.rb
|
165
|
+
- spec/support/shoulda.rb
|