mumukit-auth 3.5.0 → 3.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/auth/exceptions.rb +0 -3
- data/lib/mumukit/auth/permissions.rb +2 -1
- data/lib/mumukit/auth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75c9b0fd1c258c727eb548b526c37282bd3b02e3
|
4
|
+
data.tar.gz: 6830844a86fac1e59678f84b814ace97f7bfb0f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d73b1ca5ff76c981f7e981a40475fe49be8a21a9bc11775a752d5c5d3e494301003bd3f8605ded35bd7db3475bbc7e10532d3c89b6466fb13135452f39d337ca
|
7
|
+
data.tar.gz: 4904a2cb5e5cf1050582010c62332299946a0adc2c9eec1721344eb52719e06156704231dc450f84a5eef39ad67f3979bd650ec9e706fd8963c3d19fe6d11d67
|
@@ -18,7 +18,8 @@ class Mumukit::Auth::Permissions
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def protect!(role, slug)
|
21
|
-
raise Mumukit::Auth::UnauthorizedAccessError
|
21
|
+
raise Mumukit::Auth::UnauthorizedAccessError,
|
22
|
+
"Unauthorized access to #{slug} as #{role}. Scope is `#{scope_for role}`" unless has_permission?(role, slug)
|
22
23
|
end
|
23
24
|
|
24
25
|
def has_role?(role)
|
data/lib/mumukit/auth/version.rb
CHANGED