class Sys::Group
Attributes
Short description of the object.
Description of the group.
Name of the Windows domain to which the group account belongs.
The group ID.
Date the group was added.
Sets whether or not the group is local (as opposed to global).
An array of members for that group. May contain SID's.
Name of the Windows group account on the #domain specified.
Security identifier for this group.
Current status for the group, such as “ok”, “error”, etc.
Public Class Methods
Creates and returns a new Group object. This class encapsulates the information for a group account, whether it be global or local.
Yields self
if a block is given.
# File lib/windows/sys/admin.rb, line 44 def initialize yield self if block_given? end
Public Instance Methods
Returns whether or not the group is a local group.
# File lib/windows/sys/admin.rb, line 50 def local? @local end
Returns the type of SID (Security Identifier) as a stringified value.
# File lib/windows/sys/admin.rb, line 56 def sid_type @sid_type end
Sets the SID (Security Identifier) type to stype
, which can be
one of the following constant values:
-
Admin::SidTypeUser
-
Admin::SidTypeGroup
-
Admin::SidTypeDomain
-
Admin::SidTypeAlias
-
Admin::SidTypeWellKnownGroup
-
Admin::SidTypeDeletedAccount
-
Admin::SidTypeInvalid
-
Admin::SidTypeUnknown
-
Admin::SidTypeComputer
# File lib/windows/sys/admin.rb, line 73 def sid_type=(stype) if stype.kind_of?(String) @sid_type = stype.downcase else case stype when Admin::SidTypeUser @sid_type = "user" when Admin::SidTypeGroup @sid_type = "group" when Admin::SidTypeDomain @sid_type = "domain" when Admin::SidTypeAlias @sid_type = "alias" when Admin::SidTypeWellKnownGroup @sid_type = "well_known_group" when Admin::SidTypeDeletedAccount @sid_type = "deleted_account" when Admin::SidTypeInvalid @sid_type = "invalid" when Admin::SidTypeUnknown @sid_type = "unknown" when Admin::SidTypeComputer @sid_type = "computer" else @sid_type = "unknown" end end @sid_type end