revert: scope on config init

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
Henrique Dias 2019-01-06 12:39:11 +00:00
parent 3dbd99570c
commit f469358f22
2 changed files with 1 additions and 9 deletions

View File

@ -35,13 +35,6 @@ override the options.`,
getUserDefaults(cmd, &defaults, true)
authMethod, auther := getAuthentication(cmd)
var err error
scope := mustGetString(cmd, "scope")
if scope == "" {
scope, err = os.Getwd()
checkErr(err)
}
db, err := storm.Open(databasePath)
checkErr(err)
defer db.Close()
@ -50,7 +43,6 @@ override the options.`,
Key: generateRandomBytes(64), // 256 bit
BaseURL: mustGetString(cmd, "baseURL"),
Signup: mustGetBool(cmd, "signup"),
Scope: scope,
Shell: strings.Split(strings.TrimSpace(mustGetString(cmd, "shell")), " "),
AuthMethod: authMethod,
Defaults: defaults,

View File

@ -77,7 +77,7 @@ func addUserFlags(cmd *cobra.Command) {
cmd.Flags().Bool("sorting.asc", false, "sorting by ascending order")
cmd.Flags().Bool("lockPassword", false, "lock password")
cmd.Flags().StringSlice("commands", nil, "a list of the commands a user can execute")
cmd.Flags().String("scope", "", "scope for users")
cmd.Flags().String("scope", ".", "scope for users")
cmd.Flags().String("locale", "en", "locale for users")
cmd.Flags().String("viewMode", string(users.ListViewMode), "view mode for users")
}