Git Product home page Git Product logo

Comments (3)

connorshea avatar connorshea commented on June 14, 2024
  • Create a migration that adds a "privilege" enum (maybe come up with a better name: role or authorization_level?) to the User model.
  • Have [:default, :admin] to start with, and have :default be the default (duh).
  • Moderators and Admins can create/edit/delete platforms.
  • Moderators and Admins can create/edit/delete genres.
  • All users can create/edit games and releases, and delete releases.
  • All users can create/edit/delete release purchases for themselves.
  • All users can delete their own user accounts, but only admins can delete other users' accounts.

Maybe also have untrusted as a level that prevents the user from, e.g. creating/editing/deleting things for the first 24 hours since they signed up?

https://github.com/varvet/pundit#policy-namespacing

from vglist.

connorshea avatar connorshea commented on June 14, 2024

Some improvements in #61, started using policies in views and limiting genre policies based on user roles. Still need to add the ability to make other users mods/admins.

from vglist.

connorshea avatar connorshea commented on June 14, 2024

With #85 we can now make other users moderators/admins and take their role away, so I'm going to call this issue fully resolved.

from vglist.

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.