dshoreman / servidor

A modern web application for managing servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add backend for system users and groups

dshoreman opened this issue · comments

Certain sites, applications or services may be better ran on their own user.

Frontend/General Checklist

Groups

  • List all groups in new System/Groups page
  • Selecting a group should open editor in right pane
  • Include group users in a list under each group
  • List users separately on the edit form with 'Remove from group' option
  • Ability to add a user to a group, from Users or Groups page

Users

  • Create 'Users' endpoint under new System section
  • Display all users (including root and system users) in a list [of cards?]
  • Ensure [system-]users can be added via backend+gui
  • On edit form, display groups in a dropdown using new API endpoint
  • Add a multiselect for the user's secondary groups

Misc

  • Add a 'System' area to primary nav

API Checklist

Users

  • GET /system/users
  • POST /system/users
  • PUT /system/users
  • DELETE /system/users

Groups

  • GET /system/groups
  • POST /system/groups
  • PUT /system/groups
  • DELETE /system/users

Sample 'Create User' API Request

Flags respective to adduser command, useradd may differ.

POST /api/users
Request:
  username: string|required
  group: string|appears_in:groups   // -g
  groups: list[group]               // -G
  is_system: // -r / --system
  has_homedir: bool|default:true    // -m | -M
  homedir: path|default:null        // -d


### Sample Flow for Creating a User
[Enter a username]

<Which type of user is this?> [normal] [system]
<Can this user login?> [yes] [no]
<Set primary group?> [match username]  [select from existing] [custom]

Finally finished with the merge of #40!