MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / getUserID

Function getUserID

server/common/check_test.go:596–601  ·  view source on GitHub ↗

Helper function to safely get user ID

(user *model.User)

Source from the content-addressed store, hash-verified

594
595// Helper function to safely get user ID
596func getUserID(user *model.User) uint {
597 if user == nil {
598 return 0
599 }
600 return user.ID
601}
602
603// TestWritePermissionCombinations tests the combined permission check logic
604// that is actually used in the codebase:

Callers 2

TestCanReadFunction · 0.85
TestCanWriteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected