Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Share wikis with users #7

Open
oponder opened this issue May 9, 2015 · 4 comments
Open

Feature: Share wikis with users #7

oponder opened this issue May 9, 2015 · 4 comments
Assignees

Comments

@oponder
Copy link
Collaborator

oponder commented May 9, 2015

As an admin I should be able to assign wikis to users.

Users that have a wiki assigned to them will see it in their dashboard and be able to view / browse / edit the wiki.

Users should not be able to access wikis that they are not assigned to.

@oponder oponder added this to the First release 0.1.0 milestone May 28, 2015
@501st-alpha1 501st-alpha1 self-assigned this Jun 8, 2015
@501st-alpha1
Copy link
Owner

Right now, we have a pivot table users_wikis, which I'm not sure is used for much. I've started work on using this table to give users access to wikis.

I think the best way to implement this admin functionality would be to create a roles table (and corresponding pivot table), and use that to determine whether a user is an admin. This would allow us to extend it later, and we could e.g. have a role that allows users to add other users to wikis that they have access to.

@oponder
Copy link
Collaborator Author

oponder commented Jul 7, 2015

Have you considered 'upgrading' users_wikis to wiki_memberships, and having the role be a field on that? That way we can have users with different roles on different wikis.

Also we could distinguish between user roles and wiki_membership roles. So the user model would gain a roles field, and the new wiki_memberships model would gain a role field too.

And lastly, instead of calling it roles, I'd like to think in terms of individual abilities. So Imagine that for user abilities we have the following:

  • Create wikis
  • Delete wikis

Examples of wiki_member_ship abilities would be:

  • Create pages
  • Edit pages
  • Delete pages
  • Invite others

That way users can mix and match and create their own 'roles' on the fly.

We could use a bitmask to store these values as a single integer on user and on wiki_memberships:

Here's a gem i've used before that helps with this bitmask part: https://github.com/platform45/easy_roles

@501st-alpha1
Copy link
Owner

At first glance, that sounds good to me (and definitely is an upgrade). I'll look at this in some more detail when I get the chance.

@501st-alpha1
Copy link
Owner

I assume we also want an Admin role, which will allow the user to modify the permissions of other users.

Also it looks like you have started on some user management pages at #21, so I'll probably wait until that is merged and I can rebase to finish this completely (but I'll see how much I can do before then).

Repository owner deleted a comment from 19890843006 Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@oponder @501st-alpha1 and others