#8 ✓resolved
davesag (at gmail)

Add simple user roles.

Reported by davesag (at gmail) | September 24th, 2010 @ 01:02 AM | in v1.0

Add a simple Role object with a 'name' property.

Create a many - to - many association between users and roles.

Update the root user in seed.db to have a 'superuser' role.

A role is just a name.

Think of a role as being like a tag

  • Users can have many roles, and a role can be shared by many users. This is a many to many relationship.
  • Roles are always given singular lowercase names.
  • There are two 'blessed' roles, 'admin' and 'superuser'
  • The 'root' user configured in seed.db has both 'admin' and 'superuser' role.
  • Admin users can view, create, edit and delete other users unless those users are also admins.
  • A superuser can edit and delete an admin.
  • An admin can create, edit and delete roles except for the blessed roles, admin and superuser.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Frank is intended to be a very simple but feature complete web-app built on top of Sinatra that provides simple user login, password reminder, and user email verification with support for simple roles. It is intended to be used by other developers as both a well documented example of Sinatra in use, and a starting point for others wishing to implement simple web apps very quickly.

Shared Ticket Bins

People watching this ticket