(
            self, user_list=None, group_list=None, remove_public=False,
            permissions=None)
return error.check_return_status(response, logger)
Remove users or groups to the sketch ACL.

        Args:
            user_list: optional list of users to remove from the ACL
                of the sketch. Each user is a string.
            group_list: optional list of groups to remove from the ACL
                of the sketch. Each user is a string.
            remove_public: Optional boolean indicating the sketch should be
                no longer marked as public.
            permissions: optional list of permissions (read, write, delete).
                If not the default set of permissions are applied (read, write)

        Returns:
            A boolean indicating whether the ACL change was successful.
Remove users or groups to the sketch ACL.
Remove users or groups to the sketch ACL .
def remove_acl(
            self, user_list=None, group_list=None, remove_public=False,
            permissions=None):
        """Remove users or groups to the sketch ACL.

        Args:
            user_list: optional list of users to remove from the ACL
                of the sketch. Each user is a string.
            group_list: optional list of groups to remove from the ACL
                of the sketch. Each user is a string.
            remove_public: Optional boolean indicating the sketch should be
                no longer marked as public.
            permissions: optional list of permissions (read, write, delete).
                If not the default set of permissions are applied (read, write)

        Returns:
            A boolean indicating whether the ACL change was successful.
        """
        if not user_list and not group_list:
            return True

        resource_url = '{0:s}/sketches/{1:d}/collaborators/'.format(
            self.api.api_root, self.id)

        data = {}
        if group_list:
            group_list_corrected = [str(x).strip() for x in group_list]
            data['remove_groups'] = group_list_corrected

        if user_list:
            user_list_corrected = [str(x).strip() for x in user_list]
            data['remove_users'] = user_list_corrected

        if remove_public:
            data['public'] = 'false'

        if permissions:
            allowed_permissions = set(['read', 'write', 'delete'])
            permissions = list(
                allowed_permissions.intersection(set(permissions)))
            data['permissions'] = json.dumps(permissions)

        if not data:
            return True

        response = self.api.session.post(resource_url, json=data)
        # Refresh the sketch data to reflect ACL changes.
        _ = self.lazyload_data(refresh_cache=True)
        return error.check_return_status(response, logger)
def remove_acl ( self , user_list = None , group_list = None , remove_public = False , permissions = None ) : if not user_list and not group_list : return True resource_url = '{0:s}/sketches/{1:d}/collaborators/' . format ( self . api . api_root , self . id ) data = { } if group_list : group_list_corrected = [ str ( x ) . strip ( ) for x in group_list ] data [ 'remove_groups' ] = group_list_corrected if user_list : user_list_corrected = [ str ( x ) . strip ( ) for x in user_list ] data [ 'remove_users' ] = user_list_corrected if remove_public : data [ 'public' ] = 'false' if permissions : allowed_permissions = set ( [ 'read' , 'write' , 'delete' ] ) permissions = list ( allowed_permissions . intersection ( set ( permissions ) ) ) data [ 'permissions' ] = json . dumps ( permissions ) if not data : return True response = self . api . session . post ( resource_url , json = data ) # Refresh the sketch data to reflect ACL changes. _ = self . lazyload_data ( refresh_cache = True ) return error . check_return_status ( response , logger )