Пример #1
0
 static MembershipManager()
 {
     MembershipManager.OnMMSUpdated = () => {
     };
     MembershipManager._mmsData     = new SkyTrakSW.MMSData(IntPtr.Zero);
     MembershipManager._hasAccess   = new PermissionsSet();
     MembershipManager.InitializePermissions();
     MembershipManager._lastHistoryFlag = PlayerPrefs.GetInt("HistoryFlagKey", 0) > 0;
     MembershipManager._lastStatsFlag   = PlayerPrefs.GetInt("StatsFlagKey", 0) > 0;
 }
Пример #2
0
 public PermissionsSet Resolve(
     PublicationMethodology source,
     MyPublicationMethodologyVersionViewModel destination,
     PermissionsSet destMember,
     ResolutionContext context)
 {
     return(new PermissionsSet
     {
         CanDropMethodology = _userService
                              .CheckCanDropMethodologyLink(source)
                              .Result
                              .IsRight
     });
 }
 public PermissionsSet Resolve(
     MethodologyVersion source,
     MyMethodologyVersionViewModel destination,
     PermissionsSet destMember,
     ResolutionContext context)
 {
     return(new PermissionsSet
     {
         CanApproveMethodology = CheckResult(_userService.CheckCanApproveMethodology(source)),
         CanUpdateMethodology = CheckResult(_userService.CheckCanUpdateMethodology(source)),
         CanDeleteMethodology = CheckResult(_userService.CheckCanDeleteMethodology(source)),
         CanMakeAmendmentOfMethodology =
             CheckResult(_userService.CheckCanMakeAmendmentOfMethodology(source)),
         CanMarkMethodologyAsDraft = CheckResult(_userService.CheckCanMarkMethodologyAsDraft(source))
     });
 }