diff --git a/server/command.go b/server/command.go index 70394ec4..e151b0e8 100644 --- a/server/command.go +++ b/server/command.go @@ -639,10 +639,13 @@ func (p *Plugin) subscriptionsAddCommand(ctx context.Context, info *gitlab.UserI return err.Error() } - if hasPermission := p.permissionToProject(ctx, info.UserID, namespace, project); !hasPermission { - msg := "You don't have the permissions to create subscriptions for this project." - p.client.Log.Warn(msg) - return msg + // Only check the permissions for a project if the project subscription is created (Not a group or a subgroup subscription) + if project != "" { + if hasPermission := p.permissionToProject(ctx, info.UserID, namespace, project); !hasPermission { + msg := "You don't have the permissions to create subscriptions for this project." + p.client.Log.Warn(msg) + return msg + } } updatedSubscriptions, subscribeErr := p.Subscribe(info, namespace, project, channelID, features)