RepositoryDeleteGroup Method
|
Delete a group from the repository
Namespace:
Perforce.P4
Assembly:
p4api.net (in p4api.net.dll) Version: 2024.1.265.5426
Syntax public void DeleteGroup(
Group group,
Options options
)
Public Sub DeleteGroup (
group As Group,
options As Options
)
public:
void DeleteGroup(
Group^ group,
Options^ options
)
member DeleteGroup :
group : Group *
options : Options -> unit
Parameters
- group
- Type: Perforce.P4Group
The group to be deleted - options
- Type: Perforce.P4Options
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:
string targetGroup = "Mygroup";
Group group = new Group();
group.Id = targetGroup;
_repository.DeleteGroup(group, null);
To delete the group 'Mygroup' when the user is an owner but not a superuser:
string targetGroup = "Mygroup";
Group group = new _repository.GetGroup(targetGroup);
GroupCmdOptions opts = new GroupCmdOptions(GroupCmdFlags.OwnerAccess);
_repository.DeleteGroup(group, opts);
See Also