File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,16 @@ import (
77 "github.com/wttech/aemc/pkg/common/fmtx"
88)
99
10+ const (
11+ // Repository user types (as stored in JCR)
12+ RepUserType = "rep:User"
13+ RepSystemUserType = "rep:SystemUser"
14+
15+ // Maped user types
16+ UserType = "user"
17+ SystemUserType = "systemUser"
18+ )
19+
1020type Status struct {
1121 Type string `json:"jcr:primaryType"`
1222 AuthorizableID string `json:"rep:authorizableId"`
@@ -22,10 +32,10 @@ func UnmarshalStatus(readCloser io.ReadCloser) (*Status, error) {
2232 }
2333
2434 switch status .Type {
25- case "rep:User" :
26- status .Type = "user"
27- case "rep:SystemUser" :
28- status .Type = "systemUser"
35+ case RepUserType :
36+ status .Type = UserType
37+ case RepSystemUserType :
38+ status .Type = SystemUserType
2939 default :
3040 return nil , fmt .Errorf ("unknown user type: %s" , status .Type )
3141 }
You can’t perform that action at this time.
0 commit comments