Skip to content

Commit e6a9c75

Browse files
mhofstetterwillnorris
authored andcommitted
support tagged-devices in userExists in devmode
Even in dev mode, the user `tagged-devices` should not be reported as existing user. This allows editing & deleting links owned by `taggged-devices` in dev mode. Signed-off-by: Marco Hofstetter <[email protected]>
1 parent 2b98aed commit e6a9c75

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

golink.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,10 @@ var currentUser = func(r *http.Request) (string, error) {
565565
func userExists(ctx context.Context, login string) (bool, error) {
566566
const userTaggedDevices = "tagged-devices" // owner of tagged devices
567567

568+
if login == userTaggedDevices {
569+
return false, nil
570+
}
571+
568572
if devMode() {
569573
// in dev mode, just assume the user exists
570574
return true, nil

0 commit comments

Comments
 (0)