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

mark organizers, mods, admins with a special icon? #215

Closed
7 tasks
jywarren opened this issue Feb 21, 2015 · 15 comments
Closed
7 tasks

mark organizers, mods, admins with a special icon? #215

jywarren opened this issue Feb 21, 2015 · 15 comments
Labels
enhancement explains that the issue is to improve upon one of our existing features outreach issues involve community involvement and helping people who're stuck somewhere Ruby
Milestone

Comments

@jywarren
Copy link
Member

Proposed feature

In comments, users' profile pictures (if they exist) are shown in a small circle; see example: https://publiclab.org/notes/cbreuer/02-06-2016/oil-testing-kit-initial-electronics#comments

screenshot 2016-03-16 at 4 19 09 pm

It'd be nice to see if people are admins or moderators, perhaps with a small marker next to the image, or based on the border of the image, perhaps. We could use the "roles" system for this -- to find whether a user is user.role == 'admin' or == 'moderator' to decide how to display it. Similarly to #319, it'd be great to use a Bootstrap tooltip to explain what it means, and potentially link to a page explaining it (although the image link might still go to the user's profile page, and the link to the roles explanation could be on the profile page, where their role is listed).

The code for the image on comments is currently at https://github.com/publiclab/plots2/blob/master/app/views/notes/_comment.html.erb#L10-L12

(Eventually, this could be connected to the profile tagging system (#104) instead of being based on the role field.)

Steps to fix

  • claim this issue with a comment
  • discuss here and decide on a visual style and design to indicate role
  • set up a repository locally and make sure that all tests pass
  • start a pull request (see contributing to Public Lab software) but mark it as "in progress"
  • fix the issue following the steps above
  • make sure all tests pass
  • alert someone via either the developers list (see below) to have your pull request merged. This may take a few extra steps depending on when you do it, but we'll help you out!

Please email the developers list (see https://publiclab.org/developers) if you have questions!

@jywarren jywarren added the enhancement explains that the issue is to improve upon one of our existing features label Feb 21, 2015
@ebarry ebarry added the outreach issues involve community involvement and helping people who're stuck somewhere label Feb 23, 2015
@ebarry
Copy link
Member

ebarry commented Feb 23, 2015

When you say "roles" system, do you mean what is being conceptualized in 104?

@jywarren
Copy link
Member Author

no, the "roles" system is related to Role-based Access Control (RBAC) which we have a primitive implementation of, referred to in jywarren#160

I'd prefer to implement this in user tagging, but it doesn't make a big difference to me.

@ebarry
Copy link
Member

ebarry commented Feb 23, 2015

user tagging should be able to take care of the organizer status part of this issue, no? That's proposed in 104. but moderator and admin of the website is actually a technical role...seems different.

@jywarren
Copy link
Member Author

it's partially related to database optimization; it results in fewer and
simpler db queries if we store that data in the same table, and since we
already have a field for admin/mod roles, we could do that, and reference
'organizer' roles all over the site at near-zero cost. But it's not that
big a deal either way. I imagine @btbonval would prefer we keep (security
related) RBAC roles separate from a more generic tagging system for all
sorts of profile features, but don't know.

On Mon, Feb 23, 2015 at 10:19 AM, Liz Barry notifications@github.com
wrote:

user tagging should be able to take care of the organizer status part of
this issue, no? That's proposed in 104. but moderator and admin of the
website is actually a technical role...seems different.


Reply to this email directly or view it on GitHub
#215 (comment).

@btbonval
Copy link
Member

@jywarren I'm not sure a see a functional difference in terms of database mangement or security, it'd just be however you choose to program it in the controllers. Perhaps I'm misunderstanding the comparison of tags for security.

In some sense, groups in RBAC are tags applied to users. Users do not get direct privileges, they inherit the privileges of all groups they are assigned to. In that sense, tagging a user with their roles would be just fine.

Right now you have a heirarchical role system where each higher role inherits all privileges of the roles underneath it. RBAC is meant to be logically separated into domains of concern, so that you can have many roles and each is more or less mutually exclusive from the others. We can discuss domains of concern in more detail in the RBAC ticket.

@jywarren
Copy link
Member Author

Agreed, architecturally i'd like to have a separate table for roles instead
of the shoehorned implementation we have now. Just wanted to check with you
if you think it'd be a bad idea to simply use the proposed profile tagging
system as the role storage -- say, if you thought it was bad practice to
mix its uses with a key security function. agreed that we can manage this
effectively in controllers.

On Mon, Feb 23, 2015 at 11:41 AM, Bryan Bonvallet notifications@github.com
wrote:

@jywarren https://github.com/jywarren I'm not sure a see a functional
difference in terms of database mangement or security, it'd just be however
you choose to program it in the controllers. Perhaps I'm misunderstanding
the comparison of tags for security.

In some sense, groups in RBAC are tags applied to users. Users do not get
direct privileges, they inherit the privileges of all groups they are
assigned to. In that sense, tagging a user with their roles would be just
fine.

Right now you have a heirarchical role system. RBAC is meant to be
logically separated into domains of concern.


Reply to this email directly or view it on GitHub
#215 (comment).

@btbonval
Copy link
Member

Its only bad form if the controller is not well programmed to prevent users from adding security power tags that they ought not to, or changing existing power tags into security power tags.

Having it separated at the database level causes the database to maintain some of that logic, which is probably better for a number of reasons. However, there is no requirement that it be done as such.

Ultimately security is handled by the controller, no matter what the implementation, which is why it doesn't matter as much how you store it, so long as the controller is in charge of ensuring people can't mess with security ;)

@btbonval
Copy link
Member

Again, we might want to go back to the RBAC ticket to discuss implementation details.

@jywarren jywarren modified the milestone: 2.1 release Apr 1, 2015
@jywarren jywarren added help wanted requires help by anyone willing to contribute Ruby labels Mar 16, 2016
@ananyo2012
Copy link
Member

Here is a design suggestion. I am using gear image for a admin with a tooltip "Admin" and a star image for a moderator with a "Moderator" tooltip.We can link the corresponding images with the corresponding wiki pages.
admin_tooltip
moderator_tooltip
If it looks good I can raise a PR ready with me.

@jywarren
Copy link
Member Author

Do we ever show stuff on the right edge of that window? Maybe we can put a
grey text there. If we do, we should put it in <span class="hidden-xs"></span> so its hidden on smartphones, or only shows an
icon, no text.

On Sat, May 14, 2016 at 10:31 AM, Ananya Maiti notifications@github.com
wrote:

Here is a design suggestion. I am using gear image for a admin with a
tooltip "Admin" and a star image for a moderator with a "Moderator"
tooltip.We can link the corresponding images with the corresponding wiki
pages.
[image: admin_tooltip]
https://cloud.githubusercontent.com/assets/10486343/15268989/7a9c89c2-1a0e-11e6-9abd-139beb609d7a.png
[image: moderator_tooltip]
https://cloud.githubusercontent.com/assets/10486343/15268991/89acf564-1a0e-11e6-9a82-efd428b54545.png
If it looks good I can raise a PR ready with me.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#215 (comment)

@ananyo2012
Copy link
Member

@jywarren Didn'T get your last point. Can you explain it further? The text is shown in a tooltip as asked.

@ananyo2012
Copy link
Member

@jywarren Is there any way to recognize organizers? Is there any organizer role present for organizers?

@jywarren
Copy link
Member Author

I think we should use class="pull-right" to put the icon on the right side of that bar, rather than crowd the profile picture. I don't believe there is an "organizers" role, but I think this is a very good candidate for @lalithr95's project on profile tagging. We could simply create a role, but unfortunately then organizers couldn't also be admins or moderators. I think we need profile tagging to complete the part of this that is marking organizers -- if you solve the other parts, can you break that out as an independent issue? Thanks!

@jywarren
Copy link
Member Author

We're holding on this a bit pending some design decisions; latest via @steviepubliclab:

I'm a little conflicted on separating people out by their activity and roles on PL. I think this is coming from some of the readings that have been passed around about activity in online communities. > However, I also see the benefit for people to personally identify and share out about who they are, and what they've been up to. This can also be a positive reinforcer of activity. I think some of they points to keep in mind in building these functions that we don't create

  1. an intimidating space for newcomers or first time contributors, and
  2. an internal hierarchy, or become exclusionary by parsing out groups or contributors.
    I'm conflicted as well because in my mind I also go strait to:: What would people think of adding one for organizers?
    Love to hear other people's thoughts on this.

@jywarren jywarren removed the help wanted requires help by anyone willing to contribute label May 31, 2016
@jywarren
Copy link
Member Author

I'm going to close this since we're not sure about implementing it. If it comes back up we can re-open. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement explains that the issue is to improve upon one of our existing features outreach issues involve community involvement and helping people who're stuck somewhere Ruby
Projects
None yet
Development

No branches or pull requests

4 participants