Giter Club home page Giter Club logo

Comments (6)

pedromvieira avatar pedromvieira commented on June 2, 2024

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.

yordis avatar yordis commented on June 2, 2024

Do you mind creating an example project showcasing the issue or much better to create a PR?

from guardian.

yordis avatar yordis commented on June 2, 2024

cc: @geofflane 😭

from guardian.

pedromvieira avatar pedromvieira commented on June 2, 2024

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.

yordis avatar yordis commented on June 2, 2024

@pedromvieira do you mind opening a PR about the topic?

from guardian.

yordis avatar yordis commented on June 2, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.