Delete a group from the repository
Namespace: Perforce.P4Assembly: p4api.net (in p4api.net.dll) Version: 2015.1.103.4687 (2015.1.103.4687)
Syntax
C# |
---|
public void DeleteGroup( Group group, Options options ) |
Visual Basic |
---|
Public Sub DeleteGroup ( _ group As Group, _ options As Options _ ) |
Visual C++ |
---|
public: void DeleteGroup( Group^ group, Options^ options ) |
Parameters
- group
- Type: Perforce.P4..::..Group
The group to be deleted
- options
- Type: Perforce.P4..::..Options
The -a flag is needed to delete a group when the user is an owner but not a superuser
Examples
To delete the group 'Mygroup' when the user is a superuser:
CopyC#
To delete the group 'Mygroup' when the user is an owner but not a superuser:
CopyC#

string targetGroup = "Mygroup"; Group group = new Group(); group.Id = targetGroup; _repository.DeleteGroup(group, null);

string targetGroup = "Mygroup"; Group group = new _repository.GetGroup(targetGroup); GroupCmdOptions opts = new GroupCmdOptions(GroupCmdFlags.OwnerAccess); _repository.DeleteGroup(group, opts);