GraphQL API and utilities for the rpdata project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.3 KiB

  1. package session
  2. // DefaultPermissions gets the default permissions
  3. func DefaultPermissions() []string {
  4. return []string{
  5. "member",
  6. "log.edit",
  7. "log.reorder",
  8. "post.edit",
  9. "post.move",
  10. "file.upload",
  11. }
  12. }
  13. // AllPermissions gets all permissions and their purpose
  14. func AllPermissions() map[string]string {
  15. return map[string]string{
  16. "member": "Can add/edit/remove own content",
  17. "user.edit": "Can edit non-owned users",
  18. "character.add": "Can add non-owned characters",
  19. "character.edit": "Can edit non-owned characters",
  20. "character.remove": "Can remove non-owned characters",
  21. "channel.add": "Can add channels",
  22. "channel.edit": "Can edit channels",
  23. "channel.remove": "Can remove channels",
  24. "log.add": "Can add logs",
  25. "log.edit": "Can edit logs",
  26. "log.remove": "Can remove logs",
  27. "post.add": "Can add posts",
  28. "post.edit": "Can edit posts",
  29. "post.move": "Can move posts",
  30. "post.remove": "Can remove posts",
  31. "story.edit": "Can edit non-owned stories",
  32. "story.remove": "Can remove non-owned stories",
  33. "story.unlisted": "Can view unlisted stories by other users",
  34. "file.upload": "Can upload files",
  35. "file.edit": "Can edit non-owned files",
  36. "file.remove": "Can remove non-owned files",
  37. }
  38. }