BindGlobalPolicy (Unreal Engine)

- Declaration

static UCavrnusBinding* BindGlobalPolicy(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.

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.

BindGlobalPolicy resolves by only looking at the Organization Role. It will search for any Policies in that role 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 inside a space, use BindSpacePolicy.

- Blueprint Sample

- Code Sample

TODO: WRITE