role.go 915 B

12345678910111213141516171819202122232425262728293031323334
  1. package basics
  2. import (
  3. "github.com/qor5/docs/docsrc/generated"
  4. . "github.com/theplant/docgo"
  5. "github.com/theplant/docgo/ch"
  6. )
  7. var Role = Doc(
  8. Markdown(`
  9. **Role** provides a UI interface to manage roles(subjects) and their permissions.
  10. 1\. enable permission DBPolicy
  11. `),
  12. ch.Code(generated.RolePermEnableDBPolicy).Language("go"),
  13. Markdown(`
  14. 2\. configure role
  15. set resources that you want to manage on interface
  16. `),
  17. ch.Code(generated.RoleSetResources).Language("go"),
  18. Markdown(`
  19. (optional) set actions, the default value is the following
  20. `),
  21. ch.Code(generated.RoleSetActions).Language("go"),
  22. Markdown(`
  23. (optional) set editor subject to set who can edit **Role**
  24. `),
  25. ch.Code(generated.RoleSetEditorSubject).Language("go"),
  26. Markdown(`
  27. attach role to presets builder
  28. `),
  29. ch.Code(generated.RoleAttachToPresetsBuilder).Language("go"),
  30. ).Title("Role").
  31. Slug("presets-guide/role")