@@ -371,7 +371,7 @@ func (s *Sharing) Create(inst *instance.Instance) (*permission.Permission, error
371
371
if err := s .ValidateRules (); err != nil {
372
372
return nil , err
373
373
}
374
- if len (s .Members ) < 2 {
374
+ if ! s . Drive && len (s .Members ) < 2 {
375
375
return nil , ErrNoRecipients
376
376
}
377
377
@@ -397,7 +397,7 @@ func (s *Sharing) CreateRequest(inst *instance.Instance) error {
397
397
if err := s .ValidateRules (); err != nil {
398
398
return err
399
399
}
400
- if len (s .Members ) < 2 {
400
+ if ! s . Drive && len (s .Members ) < 2 {
401
401
return ErrNoRecipients
402
402
}
403
403
@@ -685,6 +685,9 @@ func (s *Sharing) RevokeRecipientByNotification(inst *instance.Instance, m *Memb
685
685
686
686
// NoMoreRecipient cleans up the sharing if there is no more active recipient
687
687
func (s * Sharing ) NoMoreRecipient (inst * instance.Instance ) error {
688
+ if s .Drive {
689
+ return nil
690
+ }
688
691
for _ , m := range s .Members {
689
692
if m .Status == MemberStatusReady {
690
693
return couchdb .UpdateDoc (inst , s )
@@ -1126,11 +1129,14 @@ func CheckSharings(inst *instance.Instance, skipFSConsistency bool) ([]map[strin
1126
1129
membersChecks , validMembers := s .checkSharingMembers ()
1127
1130
checks = append (checks , membersChecks ... )
1128
1131
1129
- triggersChecks := s .checkSharingTriggers (inst , accepted )
1130
- checks = append (checks , triggersChecks ... )
1132
+ var triggersChecks , credentialsChecks []map [string ]interface {}
1133
+ if ! s .Drive {
1134
+ triggersChecks = s .checkSharingTriggers (inst , accepted )
1135
+ checks = append (checks , triggersChecks ... )
1131
1136
1132
- credentialsChecks := s .checkSharingCredentials ()
1133
- checks = append (checks , credentialsChecks ... )
1137
+ credentialsChecks = s .checkSharingCredentials ()
1138
+ checks = append (checks , credentialsChecks ... )
1139
+ }
1134
1140
1135
1141
if len (membersChecks ) == 0 && len (triggersChecks ) == 0 && len (credentialsChecks ) == 0 {
1136
1142
if ! s .Owner || ! s .Active {
@@ -1391,7 +1397,7 @@ func (s *Sharing) checkSharingTriggers(inst *instance.Instance, accepted bool) (
1391
1397
}
1392
1398
1393
1399
func (s * Sharing ) checkSharingMembers () (checks []map [string ]interface {}, validMembers []* instance.Instance ) {
1394
- if len (s .Members ) < 2 {
1400
+ if ! s . Drive && len (s .Members ) < 2 {
1395
1401
checks = append (checks , map [string ]interface {}{
1396
1402
"id" : s .SID ,
1397
1403
"type" : "not_enough_members" ,
0 commit comments