cmor_rbac_backend 0.0.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +35 -0
- data/Rakefile +19 -0
- data/app/assets/javascripts/cmor/rbac/backend/application/dummy.js +0 -0
- data/app/assets/javascripts/cmor/rbac/backend/application.js +1 -0
- data/app/assets/javascripts/cmor_rbac_backend.js +1 -0
- data/app/assets/stylesheets/cmor/rbac/backend/application/dummy.css +0 -0
- data/app/assets/stylesheets/cmor/rbac/backend/application.css +3 -0
- data/app/assets/stylesheets/cmor_rbac_backend.css +3 -0
- data/app/controllers/cmor/rbac/backend/home_controller.rb +4 -0
- data/app/controllers/cmor/rbac/backend/import_default_permissions_service_controller.rb +31 -0
- data/app/controllers/cmor/rbac/backend/permissions_controller.rb +17 -0
- data/app/controllers/cmor/rbac/backend/roles_controller.rb +17 -0
- data/app/controllers/cmor/rbac/backend/users_controller.rb +21 -0
- data/app/helpers/cmor/rbac/backend/application_helper.rb +8 -0
- data/app/policies/cmor/rbac/backend/engine_policy.rb +4 -0
- data/app/policies/cmor/rbac/import_default_permissions_service_policy.rb +4 -0
- data/app/policies/cmor/rbac/permission_policy.rb +4 -0
- data/app/policies/cmor/rbac/role_policy.rb +4 -0
- data/app/policies/cmor/rbac/user_policy.rb +4 -0
- data/app/views/cmor/rbac/backend/import_default_permissions_service/_form.haml +1 -0
- data/app/views/cmor/rbac/backend/permissions/_after_show_table.html.haml +19 -0
- data/app/views/cmor/rbac/backend/permissions/_form.html.haml +10 -0
- data/app/views/cmor/rbac/backend/permissions/_index_table.html.haml +5 -0
- data/app/views/cmor/rbac/backend/permissions/_show_table.html.haml +5 -0
- data/app/views/cmor/rbac/backend/roles/_after_show_table.html.haml +20 -0
- data/app/views/cmor/rbac/backend/roles/_form.html.haml +10 -0
- data/app/views/cmor/rbac/backend/roles/_index_table.html.haml +5 -0
- data/app/views/cmor/rbac/backend/roles/_show_table.html.haml +5 -0
- data/app/views/cmor/rbac/backend/users/_after_show_table.html.haml +21 -0
- data/app/views/cmor/rbac/backend/users/_form.html.haml +5 -0
- data/app/views/cmor/rbac/backend/users/_index_table.haml +6 -0
- data/app/views/cmor/rbac/backend/users/_query_form.html.haml +1 -0
- data/app/views/cmor/rbac/backend/users/_show_table.html.haml +4 -0
- data/app/views/layouts/cmor/rbac/backend/application.html.erb +14 -0
- data/config/initializers/assets.rb +2 -0
- data/config/initializers/cmor.rb +3 -0
- data/config/locales/de.yml +24 -0
- data/config/locales/en.yml +23 -0
- data/config/rbac.yml +61 -0
- data/config/routes.rb +9 -0
- data/lib/cmor/rbac/backend/configuration.rb +22 -0
- data/lib/cmor/rbac/backend/engine.rb +9 -0
- data/lib/cmor/rbac/backend/version.rb +9 -0
- data/lib/cmor/rbac/backend.rb +12 -0
- data/lib/cmor_rbac_backend.rb +4 -0
- data/lib/generators/cmor/rbac/backend/install/install_generator.rb +21 -0
- data/lib/generators/cmor/rbac/backend/install/templates/initializer.rb +31 -0
- data/lib/generators/cmor/rbac/backend/install/templates/routes.source +4 -0
- data/lib/tasks/cmor/rbac/backend_tasks.rake +4 -0
- metadata +387 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d2dc270eda3596c7b32f3d66b9b3b32e5b7d702e369c9932b68fae4e2e56b23c
|
4
|
+
data.tar.gz: 22ceffd5b940963dbc9b87c25c8cf351a831369192c1860a68f2035c3779c561
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d9a7e3e9a63d748ebe08178f84ee7bf596775d42f26deb3b7b408dae67b4fcaa0f38c0c98dd8e81d44179b3cc3995ab838cf33b01f3abf26536b91779f52e59f
|
7
|
+
data.tar.gz: 1c8cfea96fdf73b0e40ad6579072af0db440c331ec2e464a943720bf69473ac90dffd29ce691fa00f3e49ccefb30a8f3ccb033f3f226412b8d2a732b0af6798b
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2016 Roberto Vasquez Angel
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
= Cmor::Rbac::Backend
|
2
|
+
|
3
|
+
This gem implements a backend for the cmor_rbac gem.
|
4
|
+
|
5
|
+
|
6
|
+
= Why?
|
7
|
+
|
8
|
+
* Beautiful backend to edit your permissions.
|
9
|
+
|
10
|
+
|
11
|
+
= Installation
|
12
|
+
|
13
|
+
Add it to your gemfile, bundle and run installer:
|
14
|
+
|
15
|
+
echo "\ngem 'cmor_rbac_backend'" >> Gemfile
|
16
|
+
bundle
|
17
|
+
rails g cmor:rbac:backend:install
|
18
|
+
|
19
|
+
The installer will
|
20
|
+
|
21
|
+
* add an initializer with configuration options in initializers/cmor_rbac_backend.rb.
|
22
|
+
* add a routing entry to mount the engine.
|
23
|
+
|
24
|
+
|
25
|
+
= Configuration
|
26
|
+
|
27
|
+
|
28
|
+
= Usage
|
29
|
+
|
30
|
+
Open your browser and visit http://your-app/en/backend/cmor/rbac
|
31
|
+
|
32
|
+
|
33
|
+
= License
|
34
|
+
|
35
|
+
This project rocks and uses MIT-LICENSE.
|
data/Rakefile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'Cmor::Rbac::Backend'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
Bundler::GemHelper.install_tasks
|
18
|
+
|
19
|
+
require 'rails/dummy/tasks'
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require_tree ./application
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require cmor/rbac/backend/application
|
File without changes
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Cmor::Rbac
|
2
|
+
module Backend
|
3
|
+
class ImportDefaultPermissionsServiceController < Cmor::Core::Backend::ServiceController::Base
|
4
|
+
before_action :load_filenames, only: [:new, :create]
|
5
|
+
|
6
|
+
def self.service_class
|
7
|
+
Cmor::Rbac::ImportDefaultPermissionsService
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def permitted_params
|
13
|
+
params.require(:import_default_permissions_service).permit(:filename)
|
14
|
+
end
|
15
|
+
|
16
|
+
def load_filenames
|
17
|
+
@filenames = ::Rails::Engine.subclasses.map(&:instance).collect do |engine|
|
18
|
+
filename = engine.root.join *%w(config rbac.yml)
|
19
|
+
next unless File.readable? filename
|
20
|
+
filename
|
21
|
+
end.compact
|
22
|
+
|
23
|
+
@filenames << application_filename if File.readable? application_filename
|
24
|
+
end
|
25
|
+
|
26
|
+
def application_filename
|
27
|
+
Rails.root.join *%w(config rbac.yml)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Cmor
|
2
|
+
module Rbac
|
3
|
+
module Backend
|
4
|
+
class PermissionsController < Cmor::Core::Backend::ResourcesController::Base
|
5
|
+
def self.resource_class
|
6
|
+
Cmor::Rbac::Permission
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def permitted_params
|
12
|
+
params.require(:permission).reject! { |k,v| k == 'user_ids' }.permit(:identifier, :enabled_from, :enabled_to, role_ids: [])
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Cmor
|
2
|
+
module Rbac
|
3
|
+
module Backend
|
4
|
+
class RolesController < Cmor::Core::Backend::ResourcesController::Base
|
5
|
+
def self.resource_class
|
6
|
+
Cmor::Rbac::Role
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def permitted_params
|
12
|
+
params.require(:role).permit(:identifier, :enabled_from, :enabled_to, permission_ids: [], user_ids: [])
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Cmor
|
2
|
+
module Rbac
|
3
|
+
module Backend
|
4
|
+
class UsersController < Cmor::Core::Backend::ResourcesController::Base
|
5
|
+
def self.resource_class
|
6
|
+
Cmor::Rbac::Configuration.user_class
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.available_rest_actions
|
10
|
+
super - %i(new)
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def permitted_params
|
16
|
+
params.require(:user).permit(role_ids: [])
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
= form.input :filename, as: :select, collection: @filenames
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.panel.panel-default
|
2
|
+
.panel-heading
|
3
|
+
.panel-title= Cmor::Rbac::Role.model_name.human(count: :other)
|
4
|
+
%table.table.table-striped.table-condensed.table-hover
|
5
|
+
= collection_table(collection: @resource.roles) do |table|
|
6
|
+
= table.column :identifier
|
7
|
+
= table.column :actions do |resource|
|
8
|
+
= link_to t('.show'), url_for(resource), class: 'btn btn-primary btn-xs'
|
9
|
+
.panel-footer
|
10
|
+
|
11
|
+
.panel.panel-default
|
12
|
+
.panel-heading
|
13
|
+
.panel-title= Cmor::Rbac::Configuration.user_class.model_name.human(count: :other)
|
14
|
+
%table.table.table-striped.table-condensed.table-hover
|
15
|
+
= collection_table(collection: @resource.users) do |table|
|
16
|
+
= table.column :email
|
17
|
+
= table.column :actions do |resource|
|
18
|
+
= link_to t('.show'), url_for(resource), class: 'btn btn-primary btn-xs'
|
19
|
+
.panel-footer
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
.panel.panel-default
|
3
|
+
.panel-heading
|
4
|
+
.panel-title= Cmor::Rbac::Configuration.user_class.model_name.human(count: :other)
|
5
|
+
%table.table.table-striped.table-condensed.table-hover
|
6
|
+
= collection_table(collection: @resource.users) do |table|
|
7
|
+
= table.column :email
|
8
|
+
= table.column :actions do |resource|
|
9
|
+
= link_to t('.show'), url_for(resource), class: 'btn btn-primary btn-xs'
|
10
|
+
.panel-footer
|
11
|
+
|
12
|
+
.panel.panel-default
|
13
|
+
.panel-heading
|
14
|
+
.panel-title= Cmor::Rbac::Permission.model_name.human(count: :other)
|
15
|
+
%table.table.table-striped.table-condensed.table-hover
|
16
|
+
= collection_table(collection: @resource.permissions) do |table|
|
17
|
+
= table.column :identifier
|
18
|
+
= table.column :actions do |resource|
|
19
|
+
= link_to t('.show'), url_for(resource), class: 'btn btn-primary btn-xs'
|
20
|
+
.panel-footer
|
@@ -0,0 +1,21 @@
|
|
1
|
+
- if @resource.respond_to?(:roles)
|
2
|
+
.panel.panel-default
|
3
|
+
.panel-heading
|
4
|
+
.panel-title= Cmor::Rbac::Role.model_name.human(count: :other)
|
5
|
+
%table.table.table-striped.table-condensed.table-hover
|
6
|
+
= collection_table(collection: @resource.roles) do |table|
|
7
|
+
= table.column :identifier
|
8
|
+
= table.column :actions do |resource|
|
9
|
+
= link_to t('.show'), url_for(resource), class: 'btn btn-primary btn-xs'
|
10
|
+
.panel-footer
|
11
|
+
|
12
|
+
- if @resource.respond_to?(:permissions)
|
13
|
+
.panel.panel-default
|
14
|
+
.panel-heading
|
15
|
+
.panel-title= Cmor::Rbac::Permission.model_name.human(count: :other)
|
16
|
+
%table.table.table-striped.table-condensed.table-hover
|
17
|
+
= collection_table(collection: @resource.permissions) do |table|
|
18
|
+
= table.column :identifier
|
19
|
+
= table.column :actions do |resource|
|
20
|
+
= link_to t('.show'), url_for(resource), class: 'btn btn-primary btn-xs'
|
21
|
+
.panel-footer
|
@@ -0,0 +1 @@
|
|
1
|
+
= form.input :email_cont
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Backend</title>
|
5
|
+
<%= stylesheet_link_tag "cmor/rbac/backend/application", media: "all" %>
|
6
|
+
<%= javascript_include_tag "cmor/rbac/backend/application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
de:
|
2
|
+
classes:
|
3
|
+
cmor/rbac/backend/engine: "Berechtigungen"
|
4
|
+
scopes:
|
5
|
+
never_signed_in: Niemals angemeldet
|
6
|
+
cmor:
|
7
|
+
rbac:
|
8
|
+
backend:
|
9
|
+
permissions:
|
10
|
+
show_extras:
|
11
|
+
show: 'Anzeigen'
|
12
|
+
roles:
|
13
|
+
show_extras:
|
14
|
+
show: 'Anzeigen'
|
15
|
+
users:
|
16
|
+
show_extras:
|
17
|
+
show: 'Anzeigen'
|
18
|
+
pundit:
|
19
|
+
not_authorized:
|
20
|
+
index: "Sie sind nicht berechtigt %{collection_name} aufzulisten"
|
21
|
+
new: "Sie sind nicht berechtigt %{collection_name} hinzuzufügen"
|
22
|
+
show: "Sie sind nicht berechtigt die Resource %{resource_name} anzuzeigen"
|
23
|
+
routes:
|
24
|
+
cmor-rbac-backend-engine: 'berechtigungen'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
en:
|
2
|
+
classes:
|
3
|
+
cmor/rbac/backend/engine: "Authorization"
|
4
|
+
scopes:
|
5
|
+
never_signed_in: Never signed in
|
6
|
+
cmor:
|
7
|
+
rbac:
|
8
|
+
backend:
|
9
|
+
permissions:
|
10
|
+
show_extras:
|
11
|
+
show: 'Show'
|
12
|
+
roles:
|
13
|
+
show_extras:
|
14
|
+
show: 'Show'
|
15
|
+
users:
|
16
|
+
show_extras:
|
17
|
+
show: 'Show'
|
18
|
+
pundit:
|
19
|
+
not_authorized:
|
20
|
+
index: "You are not allowed to list %{collection_name}"
|
21
|
+
new: "You are not allowed to add %{collection_name}"
|
22
|
+
routes:
|
23
|
+
cmor-rbac-backend-engine: 'authorization'
|
data/config/rbac.yml
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
defaults:
|
2
|
+
permissions:
|
3
|
+
- cmor/rbac/backend/engine
|
4
|
+
- cmor/rbac/permission/index
|
5
|
+
- cmor/rbac/permission/show
|
6
|
+
- cmor/rbac/permission/new
|
7
|
+
- cmor/rbac/permission/create
|
8
|
+
- cmor/rbac/permission/edit
|
9
|
+
- cmor/rbac/permission/update
|
10
|
+
- cmor/rbac/permission/destroy
|
11
|
+
- cmor/rbac/role/index
|
12
|
+
- cmor/rbac/role/show
|
13
|
+
- cmor/rbac/role/new
|
14
|
+
- cmor/rbac/role/create
|
15
|
+
- cmor/rbac/role/edit
|
16
|
+
- cmor/rbac/role/update
|
17
|
+
- cmor/rbac/role/destroy
|
18
|
+
- cmor/rbac/user/index
|
19
|
+
- cmor/rbac/user/show
|
20
|
+
- cmor/rbac/user/new
|
21
|
+
- cmor/rbac/user/create
|
22
|
+
- cmor/rbac/user/edit
|
23
|
+
- cmor/rbac/user/update
|
24
|
+
- cmor/rbac/user/destroy
|
25
|
+
- cmor/rbac/import_default_permissions_service/call
|
26
|
+
- cmor/rbac/import_default_permissions_service/invoke
|
27
|
+
roles:
|
28
|
+
cmor/rbac/administrator:
|
29
|
+
- cmor/rbac/backend/engine
|
30
|
+
- cmor/rbac/permission/index
|
31
|
+
- cmor/rbac/permission/show
|
32
|
+
- cmor/rbac/permission/new
|
33
|
+
- cmor/rbac/permission/create
|
34
|
+
- cmor/rbac/permission/edit
|
35
|
+
- cmor/rbac/permission/update
|
36
|
+
- cmor/rbac/permission/destroy
|
37
|
+
- cmor/rbac/role/index
|
38
|
+
- cmor/rbac/role/show
|
39
|
+
- cmor/rbac/role/new
|
40
|
+
- cmor/rbac/role/create
|
41
|
+
- cmor/rbac/role/edit
|
42
|
+
- cmor/rbac/role/update
|
43
|
+
- cmor/rbac/role/destroy
|
44
|
+
- cmor/rbac/user/index
|
45
|
+
- cmor/rbac/user/show
|
46
|
+
- cmor/rbac/user/new
|
47
|
+
- cmor/rbac/user/create
|
48
|
+
- cmor/rbac/user/edit
|
49
|
+
- cmor/rbac/user/update
|
50
|
+
- cmor/rbac/user/destroy
|
51
|
+
- cmor/rbac/import_default_permissions_service/call
|
52
|
+
- cmor/rbac/import_default_permissions_service/invoke
|
53
|
+
cmor/rbac/reviewer:
|
54
|
+
- cmor/rbac/backend/engine
|
55
|
+
- cmor/rbac/permission/index
|
56
|
+
- cmor/rbac/permission/show
|
57
|
+
- cmor/rbac/role/index
|
58
|
+
- cmor/rbac/role/show
|
59
|
+
- cmor/rbac/user/index
|
60
|
+
- cmor/rbac/user/show
|
61
|
+
- cmor/rbac/import_default_permissions_service/invoke
|
data/config/routes.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'active_support/core_ext/module/delegation'
|
2
|
+
require 'active_support/core_ext/module/attribute_accessors'
|
3
|
+
|
4
|
+
module Cmor
|
5
|
+
module Rbac
|
6
|
+
module Backend
|
7
|
+
module Configuration
|
8
|
+
def configure
|
9
|
+
yield self
|
10
|
+
end
|
11
|
+
|
12
|
+
mattr_accessor :registered_controllers do
|
13
|
+
-> { [] }
|
14
|
+
end
|
15
|
+
|
16
|
+
mattr_accessor :registered_services do
|
17
|
+
-> { [] }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'cmor/rbac/backend/configuration'
|
2
|
+
require 'cmor/rbac/backend/engine'
|
3
|
+
|
4
|
+
module Cmor
|
5
|
+
module Rbac
|
6
|
+
module Backend
|
7
|
+
extend Configuration
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
Cmor.configure { |c| c.register_configuration(:rbac_backend, Cmor::Rbac::Backend) }
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Cmor
|
2
|
+
module Rbac
|
3
|
+
module Backend
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < Rails::Generators::Base
|
6
|
+
desc 'Generates the intializer'
|
7
|
+
|
8
|
+
source_root File.expand_path('../templates', __FILE__)
|
9
|
+
|
10
|
+
def generate_initializer
|
11
|
+
copy_file 'initializer.rb', 'config/initializers/cmor_rbac_backend.rb'
|
12
|
+
end
|
13
|
+
|
14
|
+
def generate_routes
|
15
|
+
route File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source'))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
Cmor::Rbac::Backend.configure do |config|
|
2
|
+
# Set the resources, that will be shown in the backend menu.
|
3
|
+
#
|
4
|
+
# Default: config.registered_controllers = lambda {
|
5
|
+
# [
|
6
|
+
# Cmor::Rbac::Backend::RolesController
|
7
|
+
# ]
|
8
|
+
# }
|
9
|
+
#
|
10
|
+
config.registered_controllers = lambda {
|
11
|
+
[
|
12
|
+
Cmor::Rbac::Backend::UsersController,
|
13
|
+
Cmor::Rbac::Backend::RolesController,
|
14
|
+
Cmor::Rbac::Backend::PermissionsController
|
15
|
+
]
|
16
|
+
}
|
17
|
+
|
18
|
+
# Set the services, that will be shown in the backend menu.
|
19
|
+
#
|
20
|
+
# Default: config.registered_services = lambda {
|
21
|
+
# [
|
22
|
+
# Cmor::Rbac::Backend::ImportDefaultPermissionsServiceController
|
23
|
+
# ]
|
24
|
+
# }
|
25
|
+
#
|
26
|
+
config.registered_services = lambda {
|
27
|
+
[
|
28
|
+
Cmor::Rbac::Backend::ImportDefaultPermissionsServiceController
|
29
|
+
]
|
30
|
+
}
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,387 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cmor_rbac_backend
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1.pre
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Roberto Vasquez Angel
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-03-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 5.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 5.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: cmor_core_backend
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.0.1.pre
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.0.1.pre
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: sqlite3
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.3.6
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.3.6
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: responders
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: capybara
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: coveralls
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: factory_bot_rails
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: git_log_generator
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: guard-bundler
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: guard-rails
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: guard-rspec
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: pry-rails
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rails-dummy
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: rails-i18n
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: rao-shoulda_matchers
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: rspec-rails
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: rubocop
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - ">="
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: '0'
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '0'
|
251
|
+
- !ruby/object:Gem::Dependency
|
252
|
+
name: shoulda-matchers
|
253
|
+
requirement: !ruby/object:Gem::Requirement
|
254
|
+
requirements:
|
255
|
+
- - ">="
|
256
|
+
- !ruby/object:Gem::Version
|
257
|
+
version: '0'
|
258
|
+
type: :development
|
259
|
+
prerelease: false
|
260
|
+
version_requirements: !ruby/object:Gem::Requirement
|
261
|
+
requirements:
|
262
|
+
- - ">="
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: '0'
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: simplecov
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - ">="
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: '0'
|
272
|
+
type: :development
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - ">="
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: '0'
|
279
|
+
- !ruby/object:Gem::Dependency
|
280
|
+
name: simplecov-console
|
281
|
+
requirement: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - ">="
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '0'
|
286
|
+
type: :development
|
287
|
+
prerelease: false
|
288
|
+
version_requirements: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - ">="
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: '0'
|
293
|
+
- !ruby/object:Gem::Dependency
|
294
|
+
name: cmor_rbac
|
295
|
+
requirement: !ruby/object:Gem::Requirement
|
296
|
+
requirements:
|
297
|
+
- - '='
|
298
|
+
- !ruby/object:Gem::Version
|
299
|
+
version: 0.0.1.pre
|
300
|
+
type: :runtime
|
301
|
+
prerelease: false
|
302
|
+
version_requirements: !ruby/object:Gem::Requirement
|
303
|
+
requirements:
|
304
|
+
- - '='
|
305
|
+
- !ruby/object:Gem::Version
|
306
|
+
version: 0.0.1.pre
|
307
|
+
description: Cmor::Rbac::Backend Module.
|
308
|
+
email:
|
309
|
+
- roberto@vasquez-angel.de
|
310
|
+
executables: []
|
311
|
+
extensions: []
|
312
|
+
extra_rdoc_files: []
|
313
|
+
files:
|
314
|
+
- MIT-LICENSE
|
315
|
+
- README.rdoc
|
316
|
+
- Rakefile
|
317
|
+
- app/assets/javascripts/cmor/rbac/backend/application.js
|
318
|
+
- app/assets/javascripts/cmor/rbac/backend/application/dummy.js
|
319
|
+
- app/assets/javascripts/cmor_rbac_backend.js
|
320
|
+
- app/assets/stylesheets/cmor/rbac/backend/application.css
|
321
|
+
- app/assets/stylesheets/cmor/rbac/backend/application/dummy.css
|
322
|
+
- app/assets/stylesheets/cmor_rbac_backend.css
|
323
|
+
- app/controllers/cmor/rbac/backend/home_controller.rb
|
324
|
+
- app/controllers/cmor/rbac/backend/import_default_permissions_service_controller.rb
|
325
|
+
- app/controllers/cmor/rbac/backend/permissions_controller.rb
|
326
|
+
- app/controllers/cmor/rbac/backend/roles_controller.rb
|
327
|
+
- app/controllers/cmor/rbac/backend/users_controller.rb
|
328
|
+
- app/helpers/cmor/rbac/backend/application_helper.rb
|
329
|
+
- app/policies/cmor/rbac/backend/engine_policy.rb
|
330
|
+
- app/policies/cmor/rbac/import_default_permissions_service_policy.rb
|
331
|
+
- app/policies/cmor/rbac/permission_policy.rb
|
332
|
+
- app/policies/cmor/rbac/role_policy.rb
|
333
|
+
- app/policies/cmor/rbac/user_policy.rb
|
334
|
+
- app/views/cmor/rbac/backend/import_default_permissions_service/_form.haml
|
335
|
+
- app/views/cmor/rbac/backend/permissions/_after_show_table.html.haml
|
336
|
+
- app/views/cmor/rbac/backend/permissions/_form.html.haml
|
337
|
+
- app/views/cmor/rbac/backend/permissions/_index_table.html.haml
|
338
|
+
- app/views/cmor/rbac/backend/permissions/_show_table.html.haml
|
339
|
+
- app/views/cmor/rbac/backend/roles/_after_show_table.html.haml
|
340
|
+
- app/views/cmor/rbac/backend/roles/_form.html.haml
|
341
|
+
- app/views/cmor/rbac/backend/roles/_index_table.html.haml
|
342
|
+
- app/views/cmor/rbac/backend/roles/_show_table.html.haml
|
343
|
+
- app/views/cmor/rbac/backend/users/_after_show_table.html.haml
|
344
|
+
- app/views/cmor/rbac/backend/users/_form.html.haml
|
345
|
+
- app/views/cmor/rbac/backend/users/_index_table.haml
|
346
|
+
- app/views/cmor/rbac/backend/users/_query_form.html.haml
|
347
|
+
- app/views/cmor/rbac/backend/users/_show_table.html.haml
|
348
|
+
- app/views/layouts/cmor/rbac/backend/application.html.erb
|
349
|
+
- config/initializers/assets.rb
|
350
|
+
- config/initializers/cmor.rb
|
351
|
+
- config/locales/de.yml
|
352
|
+
- config/locales/en.yml
|
353
|
+
- config/rbac.yml
|
354
|
+
- config/routes.rb
|
355
|
+
- lib/cmor/rbac/backend.rb
|
356
|
+
- lib/cmor/rbac/backend/configuration.rb
|
357
|
+
- lib/cmor/rbac/backend/engine.rb
|
358
|
+
- lib/cmor/rbac/backend/version.rb
|
359
|
+
- lib/cmor_rbac_backend.rb
|
360
|
+
- lib/generators/cmor/rbac/backend/install/install_generator.rb
|
361
|
+
- lib/generators/cmor/rbac/backend/install/templates/initializer.rb
|
362
|
+
- lib/generators/cmor/rbac/backend/install/templates/routes.source
|
363
|
+
- lib/tasks/cmor/rbac/backend_tasks.rake
|
364
|
+
homepage: https://github.com/content-management-on-rails
|
365
|
+
licenses:
|
366
|
+
- MIT
|
367
|
+
metadata: {}
|
368
|
+
post_install_message:
|
369
|
+
rdoc_options: []
|
370
|
+
require_paths:
|
371
|
+
- lib
|
372
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
373
|
+
requirements:
|
374
|
+
- - ">="
|
375
|
+
- !ruby/object:Gem::Version
|
376
|
+
version: '0'
|
377
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
378
|
+
requirements:
|
379
|
+
- - ">"
|
380
|
+
- !ruby/object:Gem::Version
|
381
|
+
version: 1.3.1
|
382
|
+
requirements: []
|
383
|
+
rubygems_version: 3.0.3
|
384
|
+
signing_key:
|
385
|
+
specification_version: 4
|
386
|
+
summary: Cmor::Rbac::Backend.
|
387
|
+
test_files: []
|