BindSpacePolicy (Unreal Engine)

- Declaration

static UCavrnusBinding* BindSpacePolicy(FCavrnusSpaceConnection SpaceConnection, const FString& Policy, CavrnusPolicyUpdated OnPolicyUpdated);

Delegates Options:

DECLARE_DYNAMIC_DELEGATE_TwoParams(FCavrnusPolicyUpdated, FString, Policy, bool, IsAllowed);

typedef TFunction<void(const FString&, bool)> CavrnusPolicyUpdated;

- Description

Binds an event to throw when a policy is/isn't allowed for the user in a given space.

Important: Cavrnus user accounts will always have an Organization Role which will apply to them as soon as they authenticate. They will also have a Space Role for each space they are able to join. The Organization Role generally governs things like creating spaces and uploading objects. The Space Role generally governs the ability to make updates/modifications to the space in question. All Roles and Policies are controlled via the Management Console.

BindSpacePolicy resolves by looking at the Organization Role and the Space Role. It will search for any Policies in those roles which apply to the passed-in policy parameter. If all Policies resolve to allow it then OnPolicyUpdated will return true. Otherwise it will return false.

If you wish to resolve a Policy based on the user’s role outside of any particular space space, use BindGlobalPolicy.

- Blueprint Sample

- Code Sample

TODO: WRITE