code: def adduser(self, **params):
          
          self._check_auth(must_admin=True)
          is_admin = self._check_admin()
  
          if cherrypy.request.method.upper() == 'POST':
              params = self._parse_params(params)
              self._adduser(params)
              self._add_notification("User added")
  
          graph = {}
          for r in self.roles.graph:
              s = list(self.roles.graph[r]['sub_roles'])
              p = list(self.roles.graph[r]['parent_roles'])
              graph[r] = {'sub_roles': s, 'parent_roles': p}
          graph_js = json.dumps(graph, separators=(',', ':'))
          display_names = {}
          for r in self.roles.flatten:
              display_names[r] = self.roles.flatten[r]['display_name']
          roles_js = json.dumps(display_names, separators=(',', ':'))
          try:
              form = self.temp['form.tmpl'].render(
                  attributes=self.attributes.attributes,
                  values=None,
                  modify=False,
                  autofill=True
                  )
              roles = self.temp['roles.tmpl'].render(
                  roles=self.roles.flatten,
                  graph=self.roles.graph,
                  graph_js=graph_js,
                  roles_js=roles_js,
                  current_roles=None,
                  )
              return self.temp['adduser.tmpl'].render(
                  form=form,
                  roles=roles,
                  is_admin=is_admin,
                  custom_js=self.custom_js,
                  notifications=self._empty_notification(),
                  )
          except NameError:
              raise TemplateRenderError(
                      exceptions.text_error_template().render()
                      )
docs: add user page