Returns file owner
        This makes little sense for Artifactory, but to be consistent
        with pathlib, we return modified_by instead, if available
483958
def owner(self, pathobj):
        
        stat = self.stat(pathobj)

        if not stat.is_dir:
            return stat.modified_by
        else:
            return 'nobody'
889675
def get_owner_ids_value(self, obj):
        """"""
        return [
            user.pk
            for user in get_users_with_permission(obj, get_full_perm('owner', obj))
        ]
353071
def get_file(self, user, handle):
        
        user_dir = self.user_dir(user)
        if not user_dir.exists():
            return None

        if not is_valid_handle(handle):
            return None

        file_path = user_dir / handle

        if not file_path.exists() and not file_path.is_file():
            return None

        return file_path
69868
def get_single_file_info(f_path, int_path):
    
    return { 'path'     : force_unicode(int_path),
             'created'  : os.path.getctime(f_path),
             'last_mod' : os.path.getmtime(f_path)}
878499
def _check_symlink_ownership(path, user, group, win_owner):
    '''
    
    '''
    cur_user, cur_group = _get_symlink_ownership(path)
    if salt.utils.platform.is_windows():
        return win_owner == cur_user
    else:
        return (cur_user == user) and (cur_group == group)
144017
def set_owner
      return unless owner || group
      chown = command? 'chown'

      return unless chown

      cmd = [chown, '-R', "#{owner}:#{group}", destination_path]
      logger.debug { "Running command: #{cmd.join ' '}" }
      system(*cmd)
    end
303788
def last_updated(self):
        '''
        
        '''
        derived_path = self.context.request.url
        timestamp_key = self.timestamp_key_for(derived_path)

        if self.exists(self.timestamp_key_for, derived_path):
            return self.storage.get(timestamp_key)

        return None
1316342
def with_suffix(self, suffix):
        
        obj = super(ArtifactoryPath, self).with_suffix(suffix)
        obj.auth = self.auth
        obj.verify = self.verify
        obj.cert = self.cert
        obj.session = self.session
        return obj
242689
def usable_location(self):
        
        if self.file_location is not None:
            # Custom location typically provided via --config CLI flag
            return self._auto_complete_filename(self.file_location)
        if self.locations:
            for location in self.locations:
                path = self._auto_complete_filename(location)
                if path:
                    return path
558103
def get(self, copy=False):
        """"""
        array = getattr(self.owner, self.name)
        if copy:
            return array.copy()
        else:
            return array
964213
def _get_object_owner(name,
        object_type,
        prepend='public',
        maintenance_db=None,
        user=None,
        host=None,
        port=None,
        password=None,
        runas=None):
    '''
    
    '''
    if object_type == 'table':
        query = (' '.join([
            'SELECT tableowner AS name',
            'FROM pg_tables',
            "WHERE schemaname = '{0}'",
            "AND tablename = '{1}'"
        ])).format(prepend, name)
    elif object_type == 'sequence':
        query = (' '.join([
            'SELECT rolname AS name',
            'FROM pg_catalog.pg_class c',
            'JOIN pg_roles r',
            'ON c.relowner = r.oid',
            'JOIN pg_catalog.pg_namespace n',
            'ON n.oid = c.relnamespace',
            "WHERE relkind='S'",
            "AND nspname='{0}'",
            "AND relname = '{1}'",
        ])).format(prepend, name)
    elif object_type == 'schema':
        query = (' '.join([
            'SELECT rolname AS name',
            'FROM pg_namespace n',
            'JOIN pg_roles r',
            'ON n.nspowner = r.oid',
            "WHERE nspname = '{0}'",
        ])).format(name)
    elif object_type == 'function':
        query = (' '.join([
            'SELECT proname AS name',
            'FROM pg_catalog.pg_proc p',
            'JOIN pg_catalog.pg_namespace n',
            'ON n.oid = p.pronamespace',
            "WHERE nspname = '{0}'",
            "AND p.oid::regprocedure::text = '{1}'",
            'ORDER BY proname, proargtypes',
        ])).format(prepend, name)
    elif object_type == 'tablespace':
        query = (' '.join([
            'SELECT rolname AS name',
            'FROM pg_tablespace t',
            'JOIN pg_roles r',
            'ON t.spcowner = r.oid',
            "WHERE spcname = '{0}'",
        ])).format(name)
    elif object_type == 'language':
        query = (' '.join([
            'SELECT rolname AS name',
            'FROM pg_language l',
            'JOIN pg_roles r',
            'ON l.lanowner = r.oid',
            "WHERE lanname = '{0}'",
        ])).format(name)
    elif object_type == 'database':
        query = (' '.join([
            'SELECT rolname AS name',
            'FROM pg_database d',
            'JOIN pg_roles r',
            'ON d.datdba = r.oid',
            "WHERE datname = '{0}'",
        ])).format(name)

    rows = psql_query(
        query,
        runas=runas,
        host=host,
        user=user,
        port=port,
        maintenance_db=maintenance_db,
        password=password)
    try:
        ret = rows[0]['name']
    except IndexError:
        ret = None

    return ret
184745
def is_owner(package, abspath):
    """"""
    try:
        files = package['files']
        location = package['location']
    except KeyError:
        return False

    paths = (os.path.abspath(os.path.join(location, f))
             for f in files)

    return abspath in paths
966296
public static String getLocalFileOwner(String filePath) throws IOException {
    PosixFileAttributes attr =
        Files.readAttributes(Paths.get(filePath), PosixFileAttributes.class);
    return attr.owner().getName();
  }
311989
def only_owner(func):
    
    def decorated(*_, **kwargs):
        id = kwargs['id']
        if not current_user.is_authenticated:
            abort(401)
        elif current_user.id != id:
            abort(403)
        return func(**kwargs)

    return decorated
201294
def update(self):
        
        if self._owner_changed:
            self.update_owner(self.owner)

        self._resources = [res.name for res in self.resources]
        return self.parent.update(self)
262489
private boolean checkPartitionOwner() {
        InternalPartitionServiceImpl partitionService = getService();
        PartitionStateManager partitionStateManager = partitionService.getPartitionStateManager();
        InternalPartitionImpl partition = partitionStateManager.getPartitionImpl(getPartitionId());
        PartitionReplica owner = partition.getOwnerReplicaOrNull();

        NodeEngine nodeEngine = getNodeEngine();
        if (owner == null || !owner.isIdentical(nodeEngine.getLocalMember())) {
            ILogger logger = getLogger();
            if (logger.isFinestEnabled()) {
                logger.finest("This node is not owner partition. Cannot process request. partitionId="
                        + getPartitionId() + ", replicaIndex=" + getReplicaIndex() + ", namespaces=" + namespaces);
            }
            return false;
        }
        return true;
    }
1207291
def get_usedby_and_readonly(self, id):
        
        uri = self.URI + "/" + id + "/usedby/readonly"
        return self._client.get(uri)