Beispiel #1
0
        public void ApproveChildTrustPermission(ILinkedUser child, ActivityApprovalStatus status, Action <IPermissionResult> callback)
        {
            IInternalLinkedUser internalLinkedUser = child as IInternalLinkedUser;

            if (internalLinkedUser == null)
            {
                callback(new PermissionFailedInvalidResult());
            }
            else
            {
                ApproveChildTrustPermission(internalLinkedUser.Swid, child.AgeBand, status, callback);
            }
        }
Beispiel #2
0
        public void GetChildTrustPermission(ILinkedUser child, Action <IPermissionResult> callback)
        {
            IInternalLinkedUser internalLinkedUser = child as IInternalLinkedUser;

            if (internalLinkedUser == null)
            {
                callback(new PermissionFailedInvalidResult());
            }
            else
            {
                GetChildTrustPermission(internalLinkedUser.Swid, internalLinkedUser.AgeBand, callback);
            }
        }
Beispiel #3
0
        public void RequestTrustPermissionForChild(ILinkedUser child, Action <IPermissionResult> callback)
        {
            if (AgeBandType != AgeBandType.Adult)
            {
                callback(new PermissionFailedNotAdultResult());
                return;
            }
            IInternalLinkedUser internalLinkedUser = child as IInternalLinkedUser;

            if (internalLinkedUser == null)
            {
                callback(new PermissionResult(success: false, ActivityApprovalStatus.Unknown));
            }
            else
            {
                PermissionRequester.RequestPermissionForChild(logger, guestControllerClient, "MIX_TRUSTEDFRIENDSCOMMUNICATIONS", internalLinkedUser.Swid, callback);
            }
        }