当前位置: 首页>>代码示例>>C#>>正文


C# CMSAdminControl类代码示例

本文整理汇总了C#中CMSAdminControl的典型用法代码示例。如果您正苦于以下问题:C# CMSAdminControl类的具体用法?C# CMSAdminControl怎么用?C# CMSAdminControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CMSAdminControl类属于命名空间,在下文中一共展示了CMSAdminControl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: emailTemplateListElem_OnCheckPermissions

 /// <summary>
 /// On check permissions event handler.
 /// </summary>
 protected void emailTemplateListElem_OnCheckPermissions(string permissionType, CMSAdminControl sender)
 {
     if (!CMSContext.CurrentUser.IsAuthorizedPerResource("cms.emailtemplates", permissionType))
     {
         RedirectToCMSDeskAccessDenied("CMS.EmailTemplates", permissionType);
     }
 }
开发者ID:puentepr,项目名称:kentico-site-example,代码行数:10,代码来源:List.aspx.cs

示例2: ucOptions_OnCheckPermissions

 private void ucOptions_OnCheckPermissions(string permissionType, CMSAdminControl sender)
 {
     if (permissionType == CMSAdminControl.PERMISSION_MODIFY)
     {
         CheckProductModifyAndRedirect(EditedObject as SKUInfo);
     }
 }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:7,代码来源:Product_Edit_Options.aspx.cs

示例3: elemSubscriptions_OnCheckPermissions

 protected void elemSubscriptions_OnCheckPermissions(string permissionType, CMSAdminControl sender)
 {
     if (!MembershipContext.AuthenticatedUser.IsAuthorizedPerResource("CMS.Users", CMSAdminControl.PERMISSION_MODIFY))
     {
         RedirectToAccessDenied("CMS.Users", CMSAdminControl.PERMISSION_MODIFY);
     }
 }
开发者ID:arvind-web-developer,项目名称:csharp-projects-Jemena-Kentico-CMS,代码行数:7,代码来源:User_Edit_Subscriptions.aspx.cs

示例4: membershipEditElem_OnCheckPermissions

 protected void membershipEditElem_OnCheckPermissions(string permissionType, CMSAdminControl sender)
 {
     if (!CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.Membership", permissionType))
     {
         RedirectToCMSDeskAccessDenied("CMS.Membership", permissionType);
     }
 }
开发者ID:puentepr,项目名称:kentico-site-example,代码行数:7,代码来源:New.aspx.cs

示例5: CheckPermissions

 protected void CheckPermissions(string permissionType, CMSAdminControl sender)
 {
     if ((!currentUser.IsAuthorizedPerResource("CMS.Friends", permissionType)) && (currentUser.UserID != userId))
     {
         RedirectToAccessDenied("CMS.Friends", permissionType);
     }
 }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:7,代码来源:User_Edit_Friends_Approved.aspx.cs

示例6: forumSecurity_OnCheckPermissions

    private void forumSecurity_OnCheckPermissions(string permissionType, CMSAdminControl sender)
    {
        int groupId = 0;
        ForumInfo fi = ForumInfoProvider.GetForumInfo(ValidationHelper.GetInteger(Request.QueryString["forumid"], 0));
        if (fi != null)
        {
            ForumGroupInfo fgi = ForumGroupInfoProvider.GetForumGroupInfo(fi.ForumGroupID);
            if (fgi != null)
            {
                groupId = fgi.GroupGroupID;
            }
        }

        // Check permissions
        if (!CMSContext.CurrentUser.IsGroupAdministrator(groupId))
        {
            // Check permissions
            if (!CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.Groups", permissionType))
            {
                forumSecurity.StopProcessing = true;

                // Redirect only if permission READ is check
                if (permissionType == CMSAdminControl.PERMISSION_READ)
                {
                    RedirectToCMSDeskAccessDenied("CMS.Groups", permissionType);
                }
            }
        }
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:29,代码来源:Forum_Security.aspx.cs

示例7: elemEdit_OnCheckPermissions

 void elemEdit_OnCheckPermissions(string permissionType, CMSAdminControl sender)
 {
     MediaLibraryInfo mli = MediaLibraryInfoProvider.GetMediaLibraryInfo(QueryHelper.GetInteger("libraryid", 0));
     if (!MediaLibraryInfoProvider.IsUserAuthorizedPerLibrary(mli, "Read"))
     {
         CMSPage.RedirectToCMSDeskAccessDenied("cms.medialibrary", "Read");
     }
 }
开发者ID:KuduApps,项目名称:Kentico,代码行数:8,代码来源:Library_Edit_General.aspx.cs

示例8: ucAbuseReportList_OnCheckPermissions

 /// <summary>
 /// Check permission.
 /// </summary>
 /// <param name="permissionType">Permission type</param>
 /// <param name="sender">Sender</param>
 private void ucAbuseReportList_OnCheckPermissions(string permissionType, CMSAdminControl sender)
 {
     if (!CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.AbuseReport", permissionType))
     {
         sender.StopProcessing = true;
         RedirectToAccessDenied("CMS.AbuseReport", permissionType);
     }
 }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:13,代码来源:AbuseReport_List.aspx.cs

示例9: PollSecurity_OnCheckPermissions

 /// <summary>
 /// Check permissions event handler.
 /// </summary>
 void PollSecurity_OnCheckPermissions(string permissionType, CMSAdminControl sender)
 {
     // Check permissions
     if (!CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.Polls", permissionType))
     {
         sender.StopProcessing = true;
     }
 }
开发者ID:KuduApps,项目名称:Kentico,代码行数:11,代码来源:Polls_Security.aspx.cs

示例10: PollSecurity_OnCheckPermissions

 /// <summary>
 /// Check permissions event handler.
 /// </summary>
 private void PollSecurity_OnCheckPermissions(string permissionType, CMSAdminControl sender)
 {
     // Check permissions
     if (!MembershipContext.AuthenticatedUser.IsAuthorizedPerResource("CMS.Polls", permissionType))
     {
         sender.StopProcessing = true;
     }
 }
开发者ID:arvind-web-developer,项目名称:csharp-projects-Jemena-Kentico-CMS,代码行数:11,代码来源:Polls_Security.aspx.cs

示例11: CheckPermissions

 private void CheckPermissions(string permissionType, CMSAdminControl sender)
 {
     CurrentUserInfo currentUser = CMSContext.CurrentUser;
     if ((!currentUser.IsAuthorizedPerResource("CMS.Friends", permissionType)) && (currentUser.UserID != userId))
     {
         RedirectToAccessDenied("CMS.Friends", permissionType);
     }
 }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:8,代码来源:User_Edit_Friends_ToApprove.aspx.cs

示例12: userNotificationsElem_OnCheckPermissions

 protected void userNotificationsElem_OnCheckPermissions(string permissionType, CMSAdminControl sender)
 {
     CurrentUserInfo cui = CMSContext.CurrentUser;
     if ((cui == null) || ((userId != cui.UserID) && !cui.IsAuthorizedPerResource("CMS.Users", permissionType)))
     {
         RedirectToCMSDeskAccessDenied("CMS.Users", permissionType);
     }
 }
开发者ID:puentepr,项目名称:kentico-site-example,代码行数:8,代码来源:User_Edit_Notifications.aspx.cs

示例13: FriendsReject_OnCheckPermissions

 protected void FriendsReject_OnCheckPermissions(string permissionType, CMSAdminControl sender)
 {
     // Check if reject is for current user or another user with permission to manage it
     if ((currentUser.UserID != userId) && !currentUser.IsAuthorizedPerResource("CMS.Friends", permissionType))
     {
         RedirectToAccessDenied("CMS.Friends", permissionType);
     }
 }
开发者ID:v-jli,项目名称:jean0407large,代码行数:8,代码来源:Friends_Reject.aspx.cs

示例14: emailSender_OnCheckPermissions

 void emailSender_OnCheckPermissions(string permissionType, CMSAdminControl sender)
 {
     // Check READ permission
     if (!CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.EventManager", permissionType))
     {
         RedirectToCMSDeskAccessDenied("CMS.EventManager", permissionType);
     }
 }
开发者ID:KuduApps,项目名称:Kentico,代码行数:8,代码来源:Events_SendEmail.aspx.cs

示例15: userNotificationsElem_OnCheckPermissions

 protected void userNotificationsElem_OnCheckPermissions(string permissionType, CMSAdminControl sender)
 {
     var cui = MembershipContext.AuthenticatedUser;
     if ((cui == null) || ((mUserId != cui.UserID) && !cui.IsAuthorizedPerResource("CMS.Users", permissionType)))
     {
         RedirectToAccessDenied("CMS.Users", permissionType);
     }
 }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:8,代码来源:User_Edit_Notifications.aspx.cs


注:本文中的CMSAdminControl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。