permissionsToActions method

  1. @override
List<Action> permissionsToActions(
  1. List<TopicPermission> permissions
)
override

Convert a list of permissions to gRPC actions.

Implementation

@override
List<$p.Action> permissionsToActions(List<TopicPermission> permissions) {
  List<$p.Action> actions = permissions.fold(
      [],
      (actions, permission) => switch (permission) {
            TopicPermission.publish => [
                ...actions,
                $p.Action.TopicPublish,
              ],
          });

  return actions;
}