Return the name of the owner of this file or directory. Follow
        symbolic links.

        Return a name of the form ``r'DOMAIN\\User Name'``; may be a group.

        .. seealso:: :attr:`owner`
194108
def __get_owner_windows(self):
        
        desc = win32security.GetFileSecurity(
            self, win32security.OWNER_SECURITY_INFORMATION)
        sid = desc.GetSecurityDescriptorOwner()
        account, domain, typecode = win32security.LookupAccountSid(None, sid)
        return domain + '\\' + account
836101
def owner_profile(self) -> Profile:
        """"""
        if not self._owner_profile:
            self._owner_profile = Profile.from_id(self._context, self._node['owner']['id'])
        return self._owner_profile
410623
def get_by_owner(cls, owner):
        
        return cls.query(cls.owner==cls._get_key(owner))
555078
def _username():
    '''
    
    '''
    if pwd:
        username = pwd.getpwuid(os.getuid()).pw_name
    else:
        username = getpass.getuser()

    return username
1290251
def Name(self):
        
        name = ""
        if self.Version:
            name = self.Version.UserAgent
        return name
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)
1212073
def _groupname():
    '''
    
    '''
    if grp:
        try:
            groupname = grp.getgrgid(os.getgid()).gr_name
        except KeyError:
            groupname = ''
    else:
        groupname = ''

    return groupname
223082
def load_owner
      unless params[:owner_id].nil?
        if current_owner.present?

          # we need to try and look this owner up via the find method so that we're
          # taking advantage of any override of the find method that would be provided
          # by older versions of friendly_id. (support for newer versions default behavior
          # below.)
          searched_owner = current_owner.class.find(params[:owner_id]) rescue nil

          # if we couldn't find them that way, check whether there is a new version of
          # friendly_id in place that we can use to look them up by their slug.
          # in christoph's words, "why?!" in my words, "warum?!!!"
          # (we debugged this together on skype.)
          if searched_owner.nil? && current_owner.class.respond_to?(:friendly)
            searched_owner = current_owner.class.friendly.find(params[:owner_id]) rescue nil
          end

          if current_owner.try(:id) == searched_owner.try(:id)
            @owner = current_owner
          else
            customer = Subscription.find_customer(searched_owner)
            customer_2 = Subscription.find_customer(current_owner)
            # susbscription we are looking for belongs to the same user but to a different
            # subscription owner
            # e.g. user -> account -> subscription
            # same user but different accounts for example

            if customer_2.try(:id) == customer.try(:id)
              @owner = searched_owner
            else
              return unauthorized
            end
          end
        else
          return unauthorized
        end
      end
    end
291958
def owner? obj, relation=nil
      if relation     
        return true if user_relation?(obj, relation)
      end                                
      [:user, :owner, :author].each do |relation|        
        return true if user_relation?(obj, relation)
      end
      false
    end
1083112
def _linked_attribute(self, owner):
        
        return self.via or (utils.inflection.underscore(owner.__name__) + '_id')
443
def group_id(self):
        
        if self.derived_from is not None:
            return self.derived_from.group_id()
        if self.file_uuid is None:
            return None
        return utils.GROUP_ID_PREFIX + self.file_uuid
723511
def validate_file_ownership(config):
    """"""
    files = config.get('files', {})
    for file_name, options in files.items():
        for key in options.keys():
            if key not in ["owner", "group", "mode"]:
                raise RuntimeError(
                    "Invalid ownership configuration: {}".format(key))
        owner = options.get('owner', config.get('owner', 'root'))
        group = options.get('group', config.get('group', 'root'))
        optional = options.get('optional', config.get('optional', 'False'))
        if '*' in file_name:
            for file in glob.glob(file_name):
                if file not in files.keys():
                    if os.path.isfile(file):
                        _validate_file_ownership(owner, group, file, optional)
        else:
            if os.path.isfile(file_name):
                _validate_file_ownership(owner, group, file_name, optional)
1321116
protected function _owner()
    {
        static $owner = false;

        if ( $owner === false )
        {
            $owner = eZUser::fetch( $this->owner_id );
        }

        return $owner;
    }
1160309
public function getOwner(): string
    {
        if ($this->caching == false) {
            $ownerId = $this->getOwnerId();

            if ($ownerId == -2) {
                return "";
            }

            $owner = posix_getpwuid($ownerId);

            return $owner["name"];
        }

        if ($this->owner == null) {
            $ownerId = $this->getOwnerId();

            if ($ownerId == -2) {
                $this->owner = "";
            }

            $owner = posix_getpwuid($ownerId);

            $this->owner = $owner["name"];
        }

        return $this->owner;
    }
1259329
public function owner()
    {
        $iReturn = 0;

        foreach ($this->getMembers() as $iId => $aMember) {
            if (1 == $aMember['owner']) {
                $iReturn = $iId;
                break;
            }
        }

        return $iReturn;
    }
1238808
def get_joined_dir_name(self, atts):
        

        return os.path.join(*[getattr(self, x) for x in atts])
290965
def get_values(self):
        """"""
        attrs = super(Host, self).get_values()
        if '_owner_type' in attrs and attrs['_owner_type'] is not None:
            attrs['owner_type'] = attrs.pop('_owner_type')
        else:
            attrs.pop('_owner_type')
        return attrs