-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
Do we want to keep the ascii-table style? |
@@ -81,14 +83,6 @@ func (s Service) loadAccount(id string, a *proto.Account) (err error) { | |||
return | |||
} | |||
|
|||
// loggableAccount redacts the password from the account | |||
func loggableAccount(a *proto.Account) *proto.Account { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@butonic Replaced this with https://github.com/owncloud/ocis-accounts/pull/69/files#diff-1bc5586c5f4afccf828e3161c29aa9f2R534 as this function was modifying the reference thus causing the json-store to having the "*REMOVED" string
@IljaN this set of commands will only work in the machine that the registry is running. I was considering tackling making the ocis cli agnostic of where the command is executed by providing minimal configuration. But as a first approach, this PR is totally valid :) |
Yes we decided that this is fine for a first version. It also works via etcd btw 😎, so you need to be in the service-mesh net in a distributed setup. |
} | ||
|
||
// debugLogAccount returns a debug-log event with detailed account-info, and filtered password data | ||
func (s Service) debugLogAccount(a *proto.Account) *zerolog.Event { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for debbugging logging the account properties as fields is ok. not recommended for production because properties might collide if they are not scoped by an account object.
ocis-accounts [list|delete|update|add|inspect] Implements UpdateMask for the update request. Changed server-handler accordingly. The commands use service-discovery to discover the backend.
Here is an overview of what got changed by this pull request: Complexity increasing per file
==============================
- pkg/service/v0/accounts.go 1
- pkg/command/list_accounts.go 2
- pkg/flagset/flagset.go 1
- pkg/command/remove_account.go 3
- pkg/command/inspect_account.go 3
- pkg/command/add_account.go 7
- pkg/command/update_account.go 5
Clones added
============
- pkg/flagset/flagset.go 27
- pkg/command/remove_account.go 1
- pkg/command/inspect_account.go 1
Clones removed
==============
+ pkg/service/v0/accounts.go -5
See the complete overview on Codacy |
|
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
// Write value of username to the flags beneath, as preferred name | ||
// and on-premises-sam-account-name is probably confusing for users. | ||
if username := c.String("username"); username != "" { | ||
if !c.IsSet("on-premises-sam-account-name") { | ||
if err := c.Set("on-premises-sam-account-name", username); err != nil { | ||
return err | ||
} | ||
} | ||
|
||
if !c.IsSet("preferred-name") { | ||
if err := c.Set("preferred-name", username); err != nil { | ||
return err | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
} | ||
|
||
if c.NumFlags() == 0 { | ||
return errors.New("missing attribute-flags for update") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
First rudimentary version of ocis-accounts cli
ocis-accounts [list|delete|update|add|inspect]
Implements UpdateMask for the update request. Changed server-handler accordingly.
The commands use service-discovery to find the backend.
Demo Video: https://www.youtube.com/watch?v=tL8qWnIWDSY
Closes owncloud/product#115