Click or drag to resize

Group Class

A user group on a P4 Server, represented by a P4 Group spec.
A group specification in a Perforce repository.
Inheritance Hierarchy
SystemObject
  Perforce.P4Group

Namespace:  Perforce.P4
Assembly:  p4api.net (in p4api.net.dll) Version: 2026.1.299.3959
Syntax
public class Group

The Group type exposes the following members.

Constructors
  NameDescription
Public methodGroup(String)
Create a group supplying the name.
Public methodGroup(String, Int32, Int32, Int32, Int32, Int32, IListString, IListString, IListString, FormSpec) Obsolete.
Create a group providing all of the properties
Public methodGroup(String, Int32, Int32, Int32, Int32, Int32, Int32, IListString, IListString, IListString, FormSpec) Obsolete.
Create a group providing all of the properties
Public methodGroup(String, String, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, IListString, IListString, IListString, FormSpec)
Initializes a new instance of the Group class
Top
Properties
  NameDescription
Public propertyDescription
A description about this group
Public propertyId
The name of the group.
Public propertyIdleTimeout
A time (in seconds, unless 'unlimited' or 'unset') Specifies how long (in seconds) after the last command a login ticket is invalidated. Use 0 for unset (field omitted from spec), -1 for unlimited, or a positive integer for seconds. A user's effective timeout is the highest limit across their groups; unlimited if any group is unlimited or if none of their groups has a limit. If the value is lower than dm.user.accessupdate or dm.user.accessforce, the highest of those is used instead.
Public propertyMaxLockTime
Limits the time (in milliseconds, unless 'unlimited' or 'unset') any one operation can lock any database table when scanning data. Use 0 for unset (field omitted from spec), -1 for unlimited, or a positive integer.
Public propertyMaxMemory
Maximum amount of megabytes of random-access memory that a command can use when run by any member of this group (unless 'unlimited' or 'unset'). Use 0 for unset (field omitted from spec), -1 for unlimited, or a positive integer.
Public propertyMaxOpenFiles
The maximum number of files that a member of a group can open using a single command (unless 'unlimited' or 'unset'). Use 0 for unset (field omitted from spec), -1 for unlimited, or a positive integer.
Public propertyMaxResults
Limits the rows (unless 'unlimited' or 'unset') any one operation can return to the client. Use 0 for unset (field omitted from spec), -1 for unlimited, or a positive integer.
Public propertyMaxScanRows
Limits the rows (unless 'unlimited' or 'unset') any one operation can scan from any one database table. Use 0 for unset (field omitted from spec), -1 for unlimited, or a positive integer.
Public propertyOwnerNames
Users allowed to change this group without requiring super access permission.
Public propertyPasswordTimeout
A time (in seconds) which determines how long a 'p4 password' password remains valid (default is unset). Use 0 for unset (field omitted from spec), -1 for unlimited, or a positive integer for seconds.
Public propertySpec
Public propertySubGroups
Other groups automatically included in this group.
Public propertyTimeOut
A time (in seconds) which determines how long a 'p4 login' session ticket remains valid (default is 12 hours). Use 0 for unset (field omitted from spec), -1 for unlimited, or a positive integer for seconds.
Public propertyUserNames
The users in the group.
Top
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodFromGroupCmdTaggedOutput
Read the fields from the tagged output of a group command
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodParse
Parse the fields from a group specification
Public methodToString
Convert to specification in server format
(Overrides ObjectToString.)
Public methodToString(Int32)
Convert to specification in server format
Top
Remarks

p4 help group

group -- Change members of user group

p4 group [-a|-A] name
p4 group -d [-a | -F] name
p4 group -o name
p4 group -i [-a|-A]

Create a group or modify the membership of an existing group.
A group can contain users and other groups. The group specification
is put into a temporary file and the editor (configured by the
environment variable $P4EDITOR) is invoked.

A group exists when it has any users or other groups in it, and
ceases to exist if all users and groups in it are removed.

Each group has MaxResults, MaxScanRows, MaxLockTime, MaxOpenFiles
and MaxMemory fields, which limit the resources committed to
operations performed by members of the group. See
'p4 help maxresults' for more information on MaxResults, MaxScanRows,
MaxLockTime, MaxOpenFiles and MaxMemory.

Each group also has a Timeout field, which specifies how long (in
seconds) a 'p4 login' ticket remains valid. A value of 'unset' or
'unlimited' is equivalent to no timeout. An individual's timeout is
the highest of any group with a limit to which he belongs, unlimited
if any of his groups has 'unlimited' for the timeout value, or
unlimited if he belongs to no group with a limit. See 'p4 help login'
for more information.

Each group has a PasswordTimeout field, which determines how long a
password remains valid for members of the group.

Each group also has an IdleTimeout field, which specifies how long
(in seconds) after the last command a login ticket is invalidated.
A value of 'unset' or 'unlimited' means no idle timeout. An
individual's idle timeout is the highest of any group with a limit
to which he belongs, unlimited if any of his groups has 'unlimited'
for the idle timeout value, or unlimited if he belongs to no group
with a limit. If the value is lower than dm.user.accessupdate or
dm.user.accessforce, the highest of those is used instead.

A group may be synchronized with an LDAP group by setting the three
fields: LdapConfig, LdapSearchQuery and LdapUserAttribute. This takes
the LDAP configuration (see 'p4 ldap') specified by LdapConfig and uses
it to execute the query stored by LdapSearchQuery. The LDAP attribute
specified by LdapUserAttribute is taken to be user's username and is
added to the group's user list. At least one group owner must be set if
these LDAP fields are used. If the LDAP server requires login for
read-only queries, then the LDAP configuration must contain valid bind
credentials in the LDAP spec's SearchBindDN and SearchPasswd fields

The -d flag deletes a group.

The -o flag writes the group specification to standard output. The
user's editor is not invoked.

The -i flag reads a group specification from standard input. The
user's editor is not invoked. The new group specification replaces
the previous one.

The -a flag enables a user without 'super' access to modify the group
if that user is an 'owner' of that group. Group owners are specified
in the 'Owners' field of the group spec.

The -A flag enables a user with 'admin' access to add a new group.
Existing groups may not be modified when this flag is used.

The -F flag, used only with -d, forces the deletion of the
specified group, and also removes the group from the protections
table and from all groups.

All commands that require access granted by 'p4 protect' consider a
user's groups when calculating access levels.

'p4 group' requires 'super' access granted by 'p4 protect' unless
invoked with the '-a' or '-A' flag by a qualified user.

See Also