本文整理汇总了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);
}
}
示例2: ucOptions_OnCheckPermissions
private void ucOptions_OnCheckPermissions(string permissionType, CMSAdminControl sender)
{
if (permissionType == CMSAdminControl.PERMISSION_MODIFY)
{
CheckProductModifyAndRedirect(EditedObject as SKUInfo);
}
}
示例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);
}
}
示例5: CheckPermissions
protected void CheckPermissions(string permissionType, CMSAdminControl sender)
{
if ((!currentUser.IsAuthorizedPerResource("CMS.Friends", permissionType)) && (currentUser.UserID != userId))
{
RedirectToAccessDenied("CMS.Friends", permissionType);
}
}
示例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);
}
}
}
}
示例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");
}
}
示例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);
}
}
示例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;
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例14: emailSender_OnCheckPermissions
void emailSender_OnCheckPermissions(string permissionType, CMSAdminControl sender)
{
// Check READ permission
if (!CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.EventManager", permissionType))
{
RedirectToCMSDeskAccessDenied("CMS.EventManager", permissionType);
}
}
示例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);
}
}