I like this little add-on, which by the way seems to play just fine with NG 3.x.

However, it is not respecting role-based permissions. Specifically, the My Galleries tab should appear only on the profiles of those users who have the associated create/edit permissions for one or more content types that function as a gallery as defined in the NG relationships settings.

As it is, every single user's profile includes the My Galleries tab. This is unacceptable for a multi-level membership site such as LuthierBuilt.net, and IMO is a bug.

Thanks,

Bob

Comments

dddave’s picture

Title: Nice add-on / Does not respect role-based permission settings » Does not respect role-based permission settings

confirmed

As a work-around: I think a module like tab tamer might be able to help here. But i agree that this should be done directly by the module.

justintime’s picture

I think I understand what you're saying, but don't know that I agree.

The tab title "My Galleries" doesn't necessarily indicate that I can *edit* anything, it only implies that there are galleries owned by me that I can view. However, the code currently doesn't check to see that there are any galleries owned by me before displaying the tab.

Is that what you're referring to?

dddave’s picture

Mmh, interesting. My "natural" understanding is that anything that is "my" can be edited by me and therefore only people with the correct perms should see the tab.

Especially on profile pages there is the risk of "overtabbing", so some control from within the module would be nice. On the other hand: Are there good reasons NOT to do it like OP suggests?

Curious...

justintime’s picture

So, I finally had some time to revisit this. I think I know what to do.

The tab's name isn't right. When I'm viewing my *own* user profile, it should indeed say "My Galleries". If I'm viewing another user, it should say <Users>'s Galleries, and should only appear if I have the view permission. It should also not display the tab if the user doesn't own any galleries.

If I were to do this, would this make sense to everyone else?

justintime’s picture

Status: Active » Fixed

Well, I had time in the Coder Lounge at DrupalCamp Colorado, and coded this into the dev branch. Marking fixed, but I'm open to discussion if you feel it's still not right.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.