mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
accounts: correct word spelling
Change-Id: I6b689940c5c5eb5ae471d161c12b3aac05c4e8a1
This commit is contained in:
parent
c631fe819a
commit
58c3f98fb5
@ -74,7 +74,7 @@ const (
|
||||
KEY_TYPE_STRING_LIST = 3
|
||||
|
||||
ACCOUNT_TYPE_STANDARD = 0
|
||||
ACCOUNT_TYPE_ADMINISTACTOR = 1
|
||||
ACCOUNT_TYPE_ADMINISTRATOR = 1
|
||||
|
||||
GUEST_USER_ICON = "/var/lib/AccountsService/icons/guest.png"
|
||||
ACCOUNT_CONFIG_FILE = "/var/lib/AccountsService/accounts.ini"
|
||||
|
@ -181,7 +181,7 @@ func (obj *User) getPropAutomaticLogin() bool {
|
||||
func (obj *User) getPropAccountType() int32 {
|
||||
list := getAdministratorList()
|
||||
if strIsInList(obj.UserName, list) {
|
||||
return ACCOUNT_TYPE_ADMINISTACTOR
|
||||
return ACCOUNT_TYPE_ADMINISTRATOR
|
||||
}
|
||||
|
||||
return ACCOUNT_TYPE_STANDARD
|
||||
@ -346,15 +346,15 @@ func (obj *User) setAutomaticLogin(auto bool) {
|
||||
func (obj *User) setAccountType(acctype int32) {
|
||||
t := obj.getPropAccountType()
|
||||
switch acctype {
|
||||
case ACCOUNT_TYPE_ADMINISTACTOR:
|
||||
if t != ACCOUNT_TYPE_ADMINISTACTOR {
|
||||
case ACCOUNT_TYPE_ADMINISTRATOR:
|
||||
if t != ACCOUNT_TYPE_ADMINISTRATOR {
|
||||
ok := addUserToAdmList(obj.UserName)
|
||||
if ok {
|
||||
obj.setPropAccountType(acctype)
|
||||
}
|
||||
}
|
||||
case ACCOUNT_TYPE_STANDARD:
|
||||
if t == ACCOUNT_TYPE_ADMINISTACTOR {
|
||||
if t == ACCOUNT_TYPE_ADMINISTRATOR {
|
||||
ok := deleteUserFromAdmList(obj.UserName)
|
||||
if ok {
|
||||
obj.setPropAccountType(acctype)
|
||||
|
Loading…
x
Reference in New Issue
Block a user