rightsToScope transforms the list of rights into a string "scope". This function is only used for compatibility with osin.
(rights ...ttnpb.Right)
| 46 | // rightsToScope transforms the list of rights into a string "scope". |
| 47 | // This function is only used for compatibility with osin. |
| 48 | func rightsToScope(rights ...ttnpb.Right) string { |
| 49 | rights = ttnpb.RightsFrom(rights...).Sorted().GetRights() |
| 50 | rightStrings := make([]string, len(rights)) |
| 51 | for i, right := range rights { |
| 52 | rightStrings[i] = right.String() |
| 53 | } |
| 54 | return strings.Join(rightStrings, " ") |
| 55 | } |
| 56 | |
| 57 | // rightsFromScope is the opposite of RightsToScope. It transforms the string "scope" back into a list of rights. |
| 58 | // This function is only used for compatibility with osin. |
no test coverage detected