#1098 Add the possibility for pagure to rely on external groups
Merged by pingou. Opened by pingou.
fas_groups  into  master

Download 1098.patch
no initial comment

if i got html indentation right this time, then </div> should be in the next line.

rebased

Adjusted and rebased :)

"if not "? Don't you mean "if "?

So this would only add users to groups they're currently in, but it doesn't remove them from the Pagure groups when they're no longer in the FAS groups?

And what if I configured it to be a set?

Do you want to add a default of False?

Good catch

If GROUP_MNGT is True, then we're managing groups w/i pagure, so no need to set-up groups coming from the outside. So this looks good to me

Looks like it will be fine:

>>> s = set([1,2,3])
>>> set(s)
set([1, 2, 3])

Well, it defaults to None which will have the same effect, but for consistencies sure

2 new commits added

  • Be consisten in the way we retrieve ENABLE_GROUP_MNGT from the config
  • Remove people from groups the auth server is not returning after they log in

At least add logging, but this looks to me like you should error the login here.

11 new commits added

  • Be consistent in the way we retrieve ENABLE_GROUP_MNGT from the config
  • Remove people from groups the auth server is not returning after they log in
  • Fix html indentation
  • Adjust the logic regarding when to allow/block group management
  • Fix adding groups to a project when groups aren't managed in pagure
  • If group management is done on pagure, set-up the user's at login
  • Upon login ask if the user is in any of the groups known to pagure
  • Instead of checking for basestring, check for a list and convert if needed
  • Turn off the groups related endpoint if the configuration prevents it
  • Show/Hide the group related buttons based on the configuration
  • Add a configuration key to turn on/off managing group within pagure

It will fail removing user if: Group does not exist, User does not exist, User is not in the group.

So in all these cases I think it's fine to keep going :)

1 new commit added

  • Let's log the exceptions when adding/removing user to groups

why this?

To allow putting in groups that aren't in the list, I need to make this depending on the configuration file

1 new commit added

  • Enter new groups in the form only if groups are managed outside pagure

this should work :thumbsup:

Looks good to me :thumbsup:

Thanks, rebasing and merging :)

rebased

Pull-Request has been merged by pingou

Metadata