cloud-pipeline
cloud-pipeline copied to clipboard
Add possibility to choose way to sync blocked users with LDAP
Cloud-Pipeline has a mechanism to sync its current state with LDAP in terms of user blocking status. However right now cloud-pipeline relay that it has necessary permissions to load any object from LDAP, but in some cases we can have permissions to load only active users but not blocked ones.
Lets add an additional functionality to configure a method to determinate if user is blocked on LDAP or not. For this:
- Introduce new
System Preferencewith possible valuesLOAD_BLOCKED,LOAD_ACTIVE_AND_INTERSECT
LOAD_BLOCKED- current approach to load blocked usersLOAD_ACTIVE_AND_INTERSECT- opposite approach when we firstly try to load activeusersfrom LDAP within a list ofPipelineUserand after that check if we successfully loaded it - if so, then user is active on LDAP and should not be blocked, otherwise, if user can't be loaded - we should block such user
- in
LdapBlockedUsersManagerchangefilterBlockedUsersmethod with respect to this explanation