Skip to content

Commit

Permalink
fix logic for user consent
Browse files Browse the repository at this point in the history
  • Loading branch information
labkode committed Nov 29, 2023
1 parent 7136b5f commit 54b72a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/http/services/owncloud/ocdav/propfind.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ func (s *svc) isOpenableByUserPreference(ctx context.Context, path string) bool

req := &preferences.GetKeyRequest{
Key: &preferences.PreferenceKey{
Namespace: u.Username,
Namespace: "core",
Key: _disableOpenInApp,
},
}
Expand All @@ -589,10 +589,10 @@ func (s *svc) isOpenableByUserPreference(ctx context.Context, path string) bool
}

log.Info().Msgf("key %s is set for user %s with value %s", _disableOpenInApp, u.Username, res.Val)
if res.Val == "true" {
return true
if res.Val == "true" { // means is disabled
return false
}
return false
return true
}

// mdToPropResponse converts the CS3 metadata into a webdav PropResponse
Expand Down

0 comments on commit 54b72a6

Please sign in to comment.