Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-2541

Human readable permissions

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: Undefined Undefined
    • hms-1.4, hms-1.3
    • None
    • None
    • None

      Goal: 

      • Having a way to show a human-readable permission list, i.e. a function that returns joined array of permission.
      • It would be nice to have a limit for the length of such a human-readable list.

      We could create a new struct named Permissions: an array of strings, and have a receiver function that converts it to s string as you described.
      type Permissions []string

      func (p Permissions) String() string {
      return "...."
      }
      Therefore, we need to change []string to Permissions struct in our code.
      Acceptance Criteria:

      It is possible to use a function to concat and shorten the missing permission list.

      Usage 1: https://github.com/RHEnVision/provisioning-backend/blob/02fc79d184d3cea493b159c06d101da92d538534/cmd/pbackend/statuser.go#L189

      Possible usage 2: as an API call, and use it on the frontend: https://issues.redhat.com/browse/HMS-1245

              Unassigned Unassigned
              avitova Anna Vitova
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: