Return a list of users who can be assigned to workflow states
480099
def get_users_for_assigned_to():
    
    User = get_user_model()
    return User.objects.filter(is_active=True, is_staff=True)
500646
def list_users(self, envs=[], query="/users/"):
        
        juicer.utils.Log.log_debug(
                "List Users In: %s", ", ".join(envs))
        for env in envs:
            juicer.utils.Log.log_info("%s:" % (env))
            _r = self.connectors[env].get(query)
            if _r.status_code == Constants.PULP_GET_OK:
                for user in juicer.utils.load_json_str(_r.content):
                    roles = user['roles']
                    if roles:
                        user_roles = ', '.join(roles)
                    else:
                        user_roles = "None"
                    juicer.utils.Log.log_info("\t%s - %s" % (user['login'], user_roles))
            else:
                _r.raise_for_status()
        return True
885930
def list(self, department_id, fetch_child=False, status=0, simple=False):
        
        url = 'user/simplelist' if simple else 'user/list'
        res = self._get(
            url,
            params={
                'department_id': department_id,
                'fetch_child': 1 if fetch_child else 0,
                'status': status
            }
        )
        return res['userlist']
787752
def users(self):
        
        if self._users is None:
            self._users = UserList(self._version, service_sid=self._solution['sid'], )
        return self._users
996788
def all(cls, state=None, include_deactivated=False):
        
        if state and state not in validators.VALID_STATES:
            raise exceptions.ValidationError('Invalid "state"')
        elif state:
            organisations = yield views.organisations.get(key=state,
                                                          include_docs=True)
        elif include_deactivated:
            organisations = yield views.organisations.get(include_docs=True)
        else:
            organisations = yield views.active_organisations.get(include_docs=True)

        raise Return([cls(**org['doc']) for org in organisations['rows']])
631003
def list_configured_members(lbn, profile='default'):
    '''
    
    '''

    config = dump_config(profile)

    try:
        ret = config['worker.{0}.balance_workers'.format(lbn)]
    except KeyError:
        return []

    return [_f for _f in ret.strip().split(',') if _f]
1351777
private List<CmsUser> getAllowedIndirects(List<CmsUser> allUsers, List<CmsUser> directUsers) {

        List<CmsUser> res = new ArrayList<CmsUser>();
        for (CmsUser u : allUsers) {
            if (!directUsers.contains(u)) {
                res.add(u);
            }
        }

        return res;
    }
1127273
private void getAvailableChanges( final Map<String, String> changes) {
        WorkflowSystem.OperationCompleted<DAT> task = stateChangeQueue.poll();
        while (task != null && task.getNewState() != null) {
            changes.putAll(task.getNewState().getState());
            DAT result = task.getResult();
            if (null != sharedData && null != result) {
                sharedData.addData(result);
            }
            task = stateChangeQueue.poll();
        }
    }
1326665
def get_workflows():
    
    wftool = api.get_tool("portal_workflow")
    wfs = {}
    for wfid in wftool.objectIds():
        wf = wftool.getWorkflowById(wfid)
        if hasattr(aq_base(wf), "updateRoleMappingsFor"):
            wfs[wfid] = wf
    return wfs
762962
def user_list(self, params=None):
        """"""

        uri = 'openstack/users'
        if params:
            uri += '?%s' % urllib.urlencode(params)

        resp, body = self.get(uri)
        self.expected_success(200, resp.status)
        body = json.loads(body)
        return rest_client.ResponseBody(resp, body)
1194892
def list_users(verbose=True, hashes=False):
    '''
    
    '''
    users = {} if verbose else []

    if verbose:
        # parse detailed user data
        res = __salt__['cmd.run_all'](
            'pdbedit --list --verbose {hashes}'.format(hashes="--smbpasswd-style" if hashes else ""),
        )

        if res['retcode'] > 0:
            log.error(res['stderr'] if 'stderr' in res else res['stdout'])
            return users

        user_data = {}
        for user in res['stdout'].splitlines():
            if user.startswith('-'):
                if 'unix username' in user_data:
                    users[user_data['unix username']] = user_data
                user_data = {}
            elif ':' in user:
                label = user[:user.index(':')].strip().lower()
                data = user[(user.index(':')+1):].strip()
                user_data[label] = data

        if user_data:
            users[user_data['unix username']] = user_data
    else:
        # list users
        res = __salt__['cmd.run_all']('pdbedit --list')

        if res['retcode'] > 0:
            return {'Error': res['stderr'] if 'stderr' in res else res['stdout']}

        for user in res['stdout'].splitlines():
            if ':' not in user:
                continue
            user_data = user.split(':')
            if len(user_data) >= 3:
                users.append(user_data[0])

    return users
79130
@Service
    public List<String> getRunningWorkflows(String workflowName, Integer version,
                                            Long startTime, Long endTime) {
        if (Optional.ofNullable(startTime).orElse(0l) != 0 && Optional.ofNullable(endTime).orElse(0l) != 0) {
            return workflowExecutor.getWorkflows(workflowName, version, startTime, endTime);
        } else {
            return workflowExecutor.getRunningWorkflowIds(workflowName);
        }
    }
989966
private String getLastWorkflowForUser() {

        CmsUser user = getCmsObject().getRequestContext().getCurrentUser();
        return (String)user.getAdditionalInfo(PARAM_WORKFLOW_ID);
    }
497146
def assignees(self):
        """"""
        if 'assignees' in self._json_data and self._json_data.get('assignees_ids') == list():
            return []
        elif 'assignees' in self._json_data and self._json_data.get('assignees_ids'):
            assignees_ids_str = ','.join([str(id) for id in self._json_data.get('assignees_ids')])
            return self._client.users(id__in=assignees_ids_str, is_hidden=False)
        return None
604142
def wait_for_subworkflows(self, workflow_results):
        ''''''
        wf_ids = sum([x['pending_workflows'] for x in workflow_results], [])
        for wf_id in wf_ids:
            # here we did not check if workflow ids match
            yield self.socket
            res = self.socket.recv_pyobj()
            if res is None:
                sys.exit(0)
            elif isinstance(res, Exception):
                raise res
407795
def list_users(self, user=None):
    '''
    ''' 
    from expfactory.database.models import Participant
    participants = Participant.query.all()
    users = []
    for user in participants:
        users.append(self.print_user(user))
    return users
391270
def set_visible_to_all_users(jobflow_ids, visible=true)
      params = {
        :operation => 'SetVisibleToAllUsers',
        :visible_to_all_users => visible,
        :job_flow_ids => jobflow_ids
      }
      aws_result = @aws_request.submit(params)
      yield aws_result if block_given?
    end