diff --git a/cmd/jimmctl/cmd/relation.go b/cmd/jimmctl/cmd/relation.go index e102e5592..6c87a5338 100644 --- a/cmd/jimmctl/cmd/relation.go +++ b/cmd/jimmctl/cmd/relation.go @@ -38,28 +38,28 @@ relation command enables relation management for jimm The object and target object must be of the form - or - E.g. "user-Alice" or "controller-MyController" --f Read from a file where filename is the location of a JSON encoded file of the form: - [ - { - "object":"user-mike", - "relation":"member", - "target_object":"group-yellow" - }, - { - "object":"user-alice", - "relation":"member", - "target_object":"group-yellow" - } - ] +-f Read from a file where filename is the location of a JSON encoded file of the form: + [ + { + "object":"user-mike", + "relation":"member", + "target_object":"group-yellow" + }, + { + "object":"user-alice", + "relation":"member", + "target_object":"group-yellow" + } + ] Certain constraints apply when creating/removing a relation, namely: Object may be one of: - user tag = "user-" - group tag = "group-" - controller tag = "controller-" - model tag = "model-" - application offer tag = "offer-" + user tag = "user-" + group tag = "group-" + controller tag = "controller-" + model tag = "model-" + application offer tag = "offer-" If target_object is a group, the relation can only be: @@ -83,11 +83,10 @@ If target_object is an application offer, the relation can be one of: administrator -Additionally, if the object is a group, a userset can be applied by adding #member as follows: +Additionally, if the object is a group, a userset can be applied by adding #member as follows. +This will grant/revoke the relation to all users within TeamA: group-TeamA#member administrator controller-MyController - -This will grant/revoke the relation to all users within TeamA. ` addRelationDoc = ` @@ -130,16 +129,18 @@ Example: list relations known to jimm. Using the "target", "relation" and "object" flags, only those relations matching the filter will be returned. -Example: - jimmctl auth relation list - returns the list of all relations - jimmctl auth relation list --target - returns the list of relations, where target object - matches the specified one - jimmctl auth relation list --target --relation + returns the list of relations, where target object + matches the specified one + + jimmctl auth relation list --target --relation