Skip to content

Commit

Permalink
Merge pull request #1747 from jrha/indentation-accounts
Browse files Browse the repository at this point in the history
ncm-accounts: Fix wrapping and indentation in pan
  • Loading branch information
jrha authored Nov 29, 2024
2 parents e1b130f + 1109569 commit f02a2ec
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions ncm-accounts/src/main/pan/components/accounts/functions.pan
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,12 @@ function create_user = {
};
accounts = SELF;

if ( !exists(user_params['homeDir']) &&
exists(ACCOUNTS_USER_HOME_ROOT) &&
is_defined(username) ) {
user_params['homeDir'] = ACCOUNTS_USER_HOME_ROOT + '/' + username;
if ( !exists(user_params['homeDir']) && exists(ACCOUNTS_USER_HOME_ROOT) && is_defined(username) ) {
user_params['homeDir'] = ACCOUNTS_USER_HOME_ROOT + '/' + username;
};

if ( !exists(user_params['createHome']) &&
exists(ACCOUNTS_USER_CREATE_HOME) &&
exists(user_params['homeDir']) ) {
user_params['createHome'] = ACCOUNTS_USER_CREATE_HOME;
if ( !exists(user_params['createHome']) && exists(ACCOUNTS_USER_CREATE_HOME) && exists(user_params['homeDir']) ) {
user_params['createHome'] = ACCOUNTS_USER_CREATE_HOME;
};

if ( !exists(user_params['password']) && exists(ACCOUNTS_USER_PWD) ) {
Expand All @@ -150,10 +146,8 @@ function create_user = {
ok = first(user_params['groups'], i, groupname);
while (ok) {
if ( !exists(accounts['groups'][groupname]) ) {
if ( groupname == username &&
exists(user_params['uid']) &&
!exists(user_params['poolStart']) ) {
accounts = create_group(groupname, dict('gid', user_params['uid']));
if ( groupname == username && exists(user_params['uid']) && !exists(user_params['poolStart']) ) {
accounts = create_group(groupname, dict('gid', user_params['uid']));
} else {
if (ACCOUNTS_IGNORE_MISSING_GROUPS) {
delete(user_params['groups'][i]);
Expand Down Expand Up @@ -227,7 +221,7 @@ function create_accounts_from_db = {
} else {
accounts = create_group(accountname, accounts_db[accountname]);
};
ok = next(account_list, i, accountname);
ok = next(account_list, i, accountname);
};
} else {
ok = first(accounts_db, accountname, account_params);
Expand Down

0 comments on commit f02a2ec

Please sign in to comment.