public void RemoveBookmark(long userBookmarkID) { var bookmark = _service.GetBookmarkByID(userBookmarkID); if (!CommunitySecurity.IsAdministrator() && !bookmark.UserCreatorID.Equals(SecurityContext.CurrentAccount.ID)) { throw new SecurityException(); } var userBookmarks = _service.GetUserBookmarks(bookmark); foreach (var userBookmark in userBookmarks) { RemoveBookmarkFromFavourite(userBookmark.BookmarkID, userBookmark.UserID); } }
protected void Page_Load(object sender, EventArgs e) { IsAdmin = CommunitySecurity.IsAdministrator(); IsAuthor = Author.Equals(SecurityContext.CurrentAccount.ID); }