lesli_shield 1.1.0 → 1.1.1

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.
@@ -1 +1,31 @@
1
+ @charset "UTF-8";
2
+ /*
3
+ Lesli
1
4
 
5
+ Copyright (c) 2023, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by https://www.lesli.tech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ */
@@ -1,64 +1,38 @@
1
1
  module LesliShield
2
- class SessionsController < ApplicationController
3
- before_action :set_session, only: %i[ show edit update destroy ]
4
-
5
- # GET /sessions
6
- def index
7
- @sessions = respond_with_pagination(UserSessionService.new(current_user, query).index())
8
- respond_with_lesli(
9
- :html => @sessions,
10
- :json => @sessions
11
- )
12
- end
13
-
14
- # GET /sessions/1
15
- def show
16
- end
17
-
18
- # GET /sessions/new
19
- def new
20
- @session = Session.new
21
- end
22
-
23
- # GET /sessions/1/edit
24
- def edit
25
- end
26
-
27
- # POST /sessions
28
- def create
29
- @session = Session.new(session_params)
30
-
31
- if @session.save
32
- redirect_to @session, notice: "Session was successfully created."
33
- else
34
- render :new, status: :unprocessable_entity
35
- end
36
- end
37
-
38
- # PATCH/PUT /sessions/1
39
- def update
40
- if @session.update(session_params)
41
- redirect_to @session, notice: "Session was successfully updated.", status: :see_other
42
- else
43
- render :edit, status: :unprocessable_entity
44
- end
2
+ class SessionsController < ApplicationController
3
+ before_action :set_session, only: %i[ show edit update destroy ]
4
+
5
+ # GET /sessions
6
+ def index
7
+ @sessions = respond_with_pagination(UserSessionService.new(current_user, query).index())
8
+ respond_with_lesli(
9
+ :html => @sessions,
10
+ :json => @sessions
11
+ )
12
+ end
13
+
14
+ # GET /sessions/1
15
+ def show
16
+ end
17
+
18
+ # PATCH/PUT /sessions/1
19
+ def update
20
+ end
21
+
22
+ # DELETE /sessions/1
23
+ def destroy
24
+ end
25
+
26
+ private
27
+
28
+ # Use callbacks to share common setup or constraints between actions.
29
+ def set_session
30
+ @session = Session.find(params.expect(:id))
31
+ end
32
+
33
+ # Only allow a list of trusted parameters through.
34
+ def session_params
35
+ params.fetch(:session, {})
36
+ end
45
37
  end
46
-
47
- # DELETE /sessions/1
48
- def destroy
49
- @session.destroy!
50
- redirect_to sessions_path, notice: "Session was successfully destroyed.", status: :see_other
51
- end
52
-
53
- private
54
- # Use callbacks to share common setup or constraints between actions.
55
- def set_session
56
- @session = Session.find(params.expect(:id))
57
- end
58
-
59
- # Only allow a list of trusted parameters through.
60
- def session_params
61
- params.fetch(:session, {})
62
- end
63
- end
64
38
  end
@@ -1,4 +1,4 @@
1
1
  module LesliShield
2
- VERSION = "1.1.0"
3
- BUILD = "1774678451"
2
+ VERSION = "1.1.1"
3
+ BUILD = "1777174912"
4
4
  end
@@ -41,7 +41,7 @@ namespace :lesli_shield do
41
41
  def lesli_shield_privileges
42
42
 
43
43
  Lesli::Role.all.each do |role|
44
- L2.info("LesliShield: Syncing privileges for #{role.name} role.")
44
+ Termline.info("LesliShield: Syncing privileges for #{role.name} role.")
45
45
  LesliShield::RolePrivilegeService.new(nil).synchronize(role)
46
46
  end
47
47
  end
data/readme.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <div align="center">
2
2
  <img width="100" alt="LesliShield logo" src="./app/assets/images/lesli_shield/shield-logo.svg" />
3
- <h3 align="center">Administration area for the Lesli Framework.</h3>
3
+ <h3 align="center">Users & Security Management for the Lesli Framework.</h3>
4
4
  </div>
5
5
 
6
6
  <br />
@@ -33,15 +33,16 @@
33
33
 
34
34
  ### Installation
35
35
 
36
- ```shell
36
+ ```ruby
37
+
37
38
  # Add LesliShield engine gem
38
39
  bundle add lesli_shield
39
40
 
41
+
40
42
  # Setup & initialize the database
41
43
  rake lesli:db:setup
42
- ```
43
44
 
44
- ```ruby
45
+
45
46
  # Load LesliShield engine
46
47
  Rails.application.routes.draw do
47
48
  mount LesliShield::Engine => "/shield"
@@ -49,12 +50,12 @@ end
49
50
  ```
50
51
 
51
52
  <br />
52
- <hr/>
53
+ <hr />
53
54
  <br />
54
55
 
55
56
  ### Development
56
57
 
57
- ```shell
58
+ ```ruby
58
59
  # clone the lesli repo inside your engine folder: RailsApp/engines
59
60
  git clone https://github.com/LesliTech/LesliShield.git
60
61
 
@@ -70,7 +71,7 @@ rake lesli:db:setup
70
71
  ```
71
72
 
72
73
  <br />
73
- <hr/>
74
+ <hr />
74
75
  <br />
75
76
 
76
77
  ### Demo
@@ -86,9 +87,9 @@ rake lesli:db:setup
86
87
 
87
88
  ### Connect with Lesli
88
89
 
89
- * [X: @LesliTech](https://x.com/LesliTech)
90
- * [Email: hello@lesli.tech](hello@lesli.tech)
91
- * [Website: https://www.lesli.tech](https://www.lesli.tech)
90
+ * [@LesliTech](https://x.com/LesliTech)
91
+ * [hello@lesli.tech](hello@lesli.tech)
92
+ * [https://www.lesli.tech](https://www.lesli.tech)
92
93
 
93
94
 
94
95
  ### License
@@ -108,7 +109,6 @@ GNU General Public License for more details.
108
109
  You should have received a copy of the GNU General Public License
109
110
  along with this program. If not, see http://www.gnu.org/licenses/.
110
111
 
111
- <br />
112
112
  <hr />
113
113
  <br />
114
114
  <br />
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli_shield
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team