Comments (6)
I think that on 2.3.1 and ongoing need to define on config.exs.
base_permissions_list = [
:read,
:export_drilldown,
:export_reports,
:export_campaigns,
:export_messages,
:export_people,
:export_templates,
:template,
:people,
:campaign,
:write,
:delete,
:dashboard
]
config :my_app, MyApp.Guardian,
allowed_algos: ["HS512"],
issuer: "myapp",
token_ttl: %{
"reset" => {10, :minutes},
"magic" => {10, :minutes},
"access" => {30, :minutes},
"user" => {2, :hours},
"myuser" => {2, :hours},
"company" => {52, :weeks}
},
allowed_drift: 2000,
secret_key: Application.compile_env(:my_app, :guardian_secret_key),
permissions: %{
account: base_permissions_list,
group: base_permissions_list,
mgmt: base_permissions_list
}
from guardian.
Do you mind creating an example project showcasing the issue or much better to create a PR?
from guardian.
cc: @geofflane 😭
from guardian.
Do you mind creating an example project showcasing the issue or much better to create a PR?
It works as intended with all permissions in config.exs. My suggestions, since this is a "new behaviour", is to enhance / clarify documentation. The changelog in our opinion it is not clear enough.
We use Guardian for more than 5 years, so our list of permissions grew since and we didn't bother updating back our config.exs.
from guardian.
@pedromvieira do you mind opening a PR about the topic?
from guardian.
@pedromvieira I will encourage you to improve the documentation based on your experience.
Since
It works as intended with all permissions in config.exs
I am going to close the issue for now.
from guardian.
Related Issues (20)
- Compilation error in file guardian.ex: type options/0 undefined HOT 1
- Is guardian relying on JWT's fixed side ? HOT 2
- Provide a way to retrieve verifying secret at runtime using connection information
- Help with EnsureNotAuthenticated HOT 1
- Successfully validates a JWT token with a timestamp in the past
- use Bitwise is deprecated in elixir 1.14-dev
- Warning causing compile error with Elixir 1.14.0 HOT 1
- Unable to set secret_key in runtime.exs HOT 12
- changelog is missing in the doc HOT 1
- all_permissions? function returns true even if permission set given is not within the list of permissions provided and compiled
- I would like to be able to set permissions from a DB table rather than hard coded in a permissions set. HOT 8
- guardian.encode_and_sign 1st argument: not an atom HOT 1
- Opaque errors when token verification fails HOT 3
- Using an environment variable as a secret key in elixir 1.14 HOT 2
- Generating a JWT with kty=oct can fail because of incorrect Base64 encoding
- after_encode_and_sign result not used HOT 2
- Move to Elixir 1.14 and otp 25 HOT 3
- system_time vs os_time and time drift HOT 1
- refresh_from_cookie only accepts "default" as key HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guardian.