public void Deconstruct(out UserManager userManager, out StudioNotifyHelper studioNotifyHelper, out StudioNotifySource studioNotifySource, out DisplayUserSettingsHelper displayUserSettingsHelper) { userManager = UserManager; studioNotifyHelper = StudioNotifyHelper; studioNotifySource = StudioNotifySource; displayUserSettingsHelper = DisplayUserSettingsHelper; }
protected void Page_Load(object sender, EventArgs e) { Actions = new AllowedActions(ProfileHelper.UserInfo); MyStaff = ProfileHelper.UserInfo.IsMe(); HasActions = Actions.AllowEdit || Actions.AllowAddOrDelete; var currentUser = CoreContext.UserManager.GetUsers(SecurityContext.CurrentAccount.ID); IsAdmin = currentUser.IsAdmin(); SubscribeBtnText = StudioNotifyHelper.IsSubscribedToNotify(currentUser, Core.Notify.Actions.PeriodicNotify) ? ResourceJS.TipsAndTricksUnsubscribeBtn : ResourceJS.TipsAndTricksSubscribeBtn; if (HasActions && Actions.AllowAddOrDelete) { _phConfirmationDeleteUser.Controls.Add(LoadControl(ConfirmationDeleteUser.Location)); } ProfileEditLink = Page is MyStaff ? "/my.aspx?action=edit" : "profileaction.aspx?action=edit&user="******"reassigns.aspx?user="******"email_change"] == "success") { Page.RegisterInlineScript(string.Format("toastr.success(\"{0}\");", Resource.ChangeEmailSuccess)); } }
public AjaxResponse SubscribeToAdminNotify() { var resp = new AjaxResponse { rs1 = "0" }; try { var recipient = StudioNotifyHelper.ToRecipient(SecurityContext.CurrentAccount.ID); var isSubscribe = StudioNotifyHelper.IsSubscribedToNotify(recipient, Actions.AdminNotify); StudioNotifyHelper.SubscribeToNotify(recipient, Actions.AdminNotify, !isSubscribe); resp.rs2 = RenderAdminNotifySubscriptionState(!isSubscribe); resp.rs1 = "1"; } catch (Exception e) { resp.rs2 = e.Message.HtmlEncode(); } return(resp); }
public NotifyHelperScope(UserManager userManager, StudioNotifyHelper studioNotifyHelper, StudioNotifySource studioNotifySource, DisplayUserSettingsHelper displayUserSettingsHelper) { UserManager = userManager; StudioNotifyHelper = studioNotifyHelper; StudioNotifySource = studioNotifySource; DisplayUserSettingsHelper = displayUserSettingsHelper; }
public StudioNotifyServiceHelper(StudioNotifyHelper studioNotifyHelper, AuthContext authContext, TenantManager tenantManager, ICacheNotify <NotifyItem> cache) { StudioNotifyHelper = studioNotifyHelper; AuthContext = authContext; TenantManager = tenantManager; Cache = cache; }
public StudioNotifyServiceHelper( StudioNotifyHelper studioNotifyHelper, AuthContext authContext, TenantManager tenantManager, CommonLinkUtility commonLinkUtility, ICacheNotify <NotifyItem> cache) { StudioNotifyHelper = studioNotifyHelper; AuthContext = authContext; TenantManager = tenantManager; CommonLinkUtility = commonLinkUtility; Cache = cache; }
protected string RenderAdminNotifySubscriptionState() { return(RenderAdminNotifySubscriptionState(StudioNotifyHelper.IsSubscribedToNotify(CurrentUser, Actions.AdminNotify))); }
protected string RenderTipsAndTricksSubscriptionState() { return(RenderTipsAndTricksSubscriptionState(StudioNotifyHelper.IsSubscribedToNotify(CurrentUser, Actions.PeriodicNotify))); }
protected string RenderWhatsNewSubscriptionState() { return(RenderWhatsNewSubscriptionState(StudioNotifyHelper.IsSubscribedToNotify(CurrentUser, Actions.SendWhatsNew))); }