Changeset 4428


Ignore:
Timestamp:
Apr 25, 2017, 5:20:11 PM (2 years ago)
Author:
mabarracus
Message:

Add disavow action to plugin users

Location:
syncer/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • syncer/trunk/fuentes/debian/changelog

    r4080 r4428  
     1syncer (1.2) xenial; urgency=medium
     2
     3  * Add disavow action to plugin users
     4
     5 -- M.Angel Juan <m.angel.juan@gmail.com>  Tue, 25 Apr 2017 14:42:12 +0200
     6
    17syncer (1.1) xenial; urgency=medium
    28
  • syncer/trunk/fuentes/syncer.install/usr/lib/syncer/plugins/users.py

    r4039 r4428  
    3131                if g in current_grps:
    3232                    return True, 'User is in group ' + g
    33 
    34             return False,'Not in group'
     33            return False, 'Not in group'
     34        if (params['action']) == 'disavow_grp':
     35            grouplist=params['options']
     36            groups_to_apply=grouplist.split(',')
     37            current_grps=self.get_current_groups()
     38            for g in groups_to_apply:
     39                if g in current_grps:
     40                    return False, 'Not allowed for this group ' + g
     41            return True, 'User don\'t disavow condition {}'.format(grouplist)
    3542
    3643
    3744
     45
     46
Note: See TracChangeset for help on using the changeset viewer.