Closed damiankloip closed 8 years ago
I think we need to keep OgAccess::ADMINISTER_GROUP_PERMISSION
as that is a global thing.
Wow, it's @damiankloip! :)
@amitaibu Surprise!
This looks good to me!
Note that getMembership()
is not tested here, but this has been cherry-picked from #217. A test for this method will be added in that PR.
Small remark: I think it's a good idea to rename Og::getUserMembership()
to Og::getMembership()
. For consistency, can you also rename Og:getUserMemberships()
to Og::getMemberships()
?
@pfrenssen yes, we already discussed that on here but it's on one of the 'out of date diff' comments, see https://github.com/amitaibu/og/pull/225#discussion_r66575563 . Basically renaming that will extend the scope of this further than we need so I think that can be a simple follow up. That keeps things easier to review.
:+1:
I think no conflicts with thw og access service PR. wow! :)
needs a re-roll
Yeah, this is a nasty re-roll. I can't even be bothered to do this now... It will have to wait.
I can give it a try. I can take the shortcut and do a git merge 8.x-1.x
. I hate rebasing..
@damiankloip since it's on your own repo, I'll create a new PR for this. Is that ok with you?
Yes sure. Just base it from this branch and it should be all good?
git is great! Closed in favor of #231
git is great. Thanks @amitaibu
Created followup novice issue to rename Og::getUserMemberships()
to Og::getMemberships()
.
Currently we extend
Role
withOgRole
but remove theis_admin
flag usage, but all the methods are available. We are also using all the Role methods to check a role has a permission etc.. isAdmin() is built into all that. As if a role have that, it will always return true. So this is a simpler way of implementing admin permission checking, and being more in line with core.