Skip to content

Commit

Permalink
Minor model update for groups, readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
markdicksonjr committed Feb 12, 2020
1 parent 9ee6452 commit 143d46b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type User struct {
AddressStateOrProvince *string `json:"addressStateOrProvince,omitempty"`
AddressPostalCode *string `gorm:"size:16" json:"postalCode,omitempty"`
CountryCode *string `gorm:"size:3" json:"countryCode,omitempty"`
CompanyId *string `json:"companyId,omitempty"`
EmployeeId *string `json:"employeeId,omitempty"`
ReferenceId *string `json:"referenceId,omitempty"`
PasswordResetToken *string `json:"passwordResetToken,omitempty"`
Expand All @@ -52,7 +53,6 @@ type User struct {
PrimaryLocation *string `json:"primaryLocation,omitempty"` // e.g. lat/long, grid codes, etc
Context *string `json:"context,omitempty"`
ProtectedContext *string `json:"protectedContext,omitempty"`
CurrentGroupID *string `json:"currentGroupId,omitempty"`
}

// basic model for both role-based and group privilege-based auth control
Expand Down Expand Up @@ -82,7 +82,7 @@ type GroupPrivilege struct {
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt *time.Time `json:"deletedAt,omitempty" sql:"index"`
GroupID string `json:"groupID" gorm:"foreignkey:groupId"` // "performing group id" e.g. "administrators" ID
GroupID string `json:"groupID" gorm:"foreignkey:GroupID"` // "performing group id" e.g. "administrators" ID
TargetGroupID string `json:"targetGroupID"` // e.g. "customers" ID
Action string `json:"action"` // e.g. read/write/admin/etc
}
2 changes: 1 addition & 1 deletion user/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Nibbler User

Provides a basic user model, and some means to persist and query it.
Provides a basic user model, and some means to persist and query it. No API endpoints are added by this extension

## Utilities

Expand Down

0 comments on commit 143d46b

Please sign in to comment.