if (model.excludeFromFederation) {\r
roles.add(Constants.NOT_FEDERATED_ROLE);\r
}\r
+ if (roles.size() == 0) {\r
+ // we do this to ensure that user record with no password\r
+ // is written. otherwise, StoredConfig optimizes that account\r
+ // away. :(\r
+ roles.add(Constants.NO_ROLE);\r
+ }\r
config.setStringList(USER, model.username, ROLE, roles);\r
\r
// repository memberships\r
public static final String ADMIN_ROLE = "#admin";\r
\r
public static final String NOT_FEDERATED_ROLE = "#notfederated";\r
+ \r
+ public static final String NO_ROLE = "#none";\r
\r
public static final String PROPERTIES_FILE = "gitblit.properties";\r
\r