/// <summary> /// Constructor /// </summary> /// <param name="context"></param> /// <param name="settingsService"> </param> /// <param name="localizationService"> </param> /// <param name="activityService"> </param> /// <param name="cacheService"></param> /// <param name="voteService"></param> /// <param name="badgeService"></param> /// <param name="privateMessageService"></param> /// <param name="favouriteService"></param> /// <param name="membershipUserPointsService"></param> /// <param name="topicService"></param> /// <param name="categoryService"></param> /// <param name="postService"></param> /// <param name="notificationService"></param> /// <param name="pollService"></param> public MembershipService(IMvcForumContext context, ISettingsService settingsService, ILocalizationService localizationService, IActivityService activityService, ICacheService cacheService, IVoteService voteService, IBadgeService badgeService, IPrivateMessageService privateMessageService, IFavouriteService favouriteService, IMembershipUserPointsService membershipUserPointsService, ITopicService topicService, ICategoryService categoryService, IPostService postService, INotificationService notificationService, IPollService pollService) { _settingsService = settingsService; _localizationService = localizationService; _activityService = activityService; _cacheService = cacheService; _voteService = voteService; _badgeService = badgeService; _privateMessageService = privateMessageService; _favouriteService = favouriteService; _membershipUserPointsService = membershipUserPointsService; _topicService = topicService; _categoryService = categoryService; _postService = postService; _notificationService = notificationService; _pollService = pollService; _context = context; }
/// <inheritdoc /> public async Task <IPipelineProcess <MembershipUser> > Process(IPipelineProcess <MembershipUser> input, IMvcForumContext context) { _roleService.RefreshContext(context); _localizationService.RefreshContext(context); // Get the Current user from ExtendedData var username = input.ExtendedData[Constants.ExtendedDataKeys.Username] as string; // See if we can get the username if (!string.IsNullOrWhiteSpace(username)) { var loggedOnUser = await context.MembershipUser.FirstOrDefaultAsync(x => x.UserName == username); var loggedOnUsersRole = loggedOnUser.GetRole(_roleService); var loggedOnUserId = loggedOnUser?.Id ?? Guid.Empty; var permissions = _roleService.GetPermissions(null, loggedOnUsersRole); if (loggedOnUsersRole.RoleName == Constants.AdminRoleName || loggedOnUserId == input.EntityToProcess.Id || permissions[ForumConfiguration.Instance.PermissionEditMembers].IsTicked) { input.Successful = true; input.ProcessLog.Add("Completed EditUserPermissionsPipe successfully"); return(input); } } // No permission input.AddError(_localizationService.GetResourceString("Errors.NoPermission")); return(input); }
/// <inheritdoc /> public void RefreshContext(IMvcForumContext context) { _context = context; _groupPermissionForRoleService.RefreshContext(context); _permissionService.RefreshContext(context); _globalPermissionForRoleService.RefreshContext(context); }
// Create new app - https://account.live.com/developers/applications/create // List of existing app - https://account.live.com/developers/applications/index public MicrosoftOAuthController(ILoggingService loggingService, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, ICacheService cacheService, IMvcForumContext context) : base(loggingService, membershipService, localizationService, roleService, settingsService, cacheService, context) { }
/// <inheritdoc /> public void RefreshContext(IMvcForumContext context) { _context = context; _topicService.RefreshContext(context); _postService.RefreshContext(context); _groupService.RefreshContext(context); }
public AdminSocialController(ILoggingService loggingService, IMembershipService membershipService, ILocalizationService localizationService, ISettingsService settingsService, ICacheService cacheService, IMvcForumContext context) : base(loggingService, membershipService, localizationService, settingsService, context) { _cacheService = cacheService; }
/// <inheritdoc /> public void RefreshContext(IMvcForumContext context) { _context = context; _roleService.RefreshContext(context); _notificationService.RefreshContext(context); _categoryPermissionForRoleService.RefreshContext(context); }
/// <summary> /// Constructor /// </summary> /// <param name="loggingService"> </param> /// <param name="membershipService"></param> /// <param name="localizationService"> </param> /// <param name="settingsService"> </param> /// <param name="bannedEmailService"></param> /// <param name="context"></param> public BannedEmailController(ILoggingService loggingService, IMembershipService membershipService, ILocalizationService localizationService, ISettingsService settingsService, IBannedEmailService bannedEmailService, IMvcForumContext context) : base(loggingService, membershipService, localizationService, settingsService, context) { _bannedEmailService = bannedEmailService; }
public PollController(ILoggingService loggingService, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, IPollService pollService, ICacheService cacheService, IMvcForumContext context) : base(loggingService, membershipService, localizationService, roleService, settingsService, cacheService, context) { _pollService = pollService; }
public RoleService(IMvcForumContext context, ICategoryPermissionForRoleService categoryPermissionForRoleService, IPermissionService permissionService, IGlobalPermissionForRoleService globalPermissionForRoleService, ICacheService cacheService) { _categoryPermissionForRoleService = categoryPermissionForRoleService; _permissionService = permissionService; _globalPermissionForRoleService = globalPermissionForRoleService; _cacheService = cacheService; _context = context; }
/// <summary> /// Constructor /// </summary> /// <param name="context"></param> /// <param name="roleService"> </param> /// <param name="categoryNotificationService"> </param> /// <param name="categoryPermissionForRoleService"></param> /// <param name="cacheService"></param> public CategoryService(IMvcForumContext context, IRoleService roleService, ICategoryNotificationService categoryNotificationService, ICategoryPermissionForRoleService categoryPermissionForRoleService, ICacheService cacheService) { _roleService = roleService; _categoryNotificationService = categoryNotificationService; _categoryPermissionForRoleService = categoryPermissionForRoleService; _cacheService = cacheService; _context = context; }
/// <summary> /// Constructor /// </summary> /// <param name="settingsService"> </param> /// <param name="loggingService"></param> /// <param name="cacheService"></param> /// <param name="context"></param> public LocalizationService(ISettingsService settingsService, ILoggingService loggingService, ICacheService cacheService, IMvcForumContext context) { _settingsService = settingsService; _loggingService = loggingService; _cacheService = cacheService; _context = context; _perRequestLanguageStrings = ResourceKeysByLanguage(CurrentLanguage); }
/// <summary> /// Constructor /// </summary> /// <param name="context"></param> /// <param name="membershipService"> </param> /// <param name="localizationService"></param> /// <param name="settingsService"> </param> /// <param name="badgeService"> </param> /// <param name="loggingService"> </param> public AdminBadgeController(IBadgeService badgeService, ILoggingService loggingService, IMvcForumContext context, IMembershipService membershipService, ILocalizationService localizationService, ISettingsService settingsService) : base(loggingService, membershipService, localizationService, settingsService, context) { _badgeService = badgeService; }
public NotificationService(IMvcForumContext context, ILocalizationService localizationService, IEmailService emailService, ISettingsService settingsService, ILoggingService loggingService) { _context = context; _localizationService = localizationService; _emailService = emailService; _settingsService = settingsService; _loggingService = loggingService; }
/// <inheritdoc /> public void RefreshContext(IMvcForumContext context) { _context = context; _badgeService.RefreshContext(context); _topicService.RefreshContext(context); _postService.RefreshContext(context); _categoryService.RefreshContext(context); }
public RecurringJobService(ILoggingService loggingService, ISettingsService settingsService, ITopicService topicService, ILocalizationService localizationService, IMvcForumContext context, EmailService emailService) { _loggingService = loggingService; _settingsService = settingsService; _topicService = topicService; _localizationService = localizationService; _context = context; _emailService = emailService; }
public SnippetsController(ILoggingService loggingService, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, IMembershipUserPointsService membershipUserPointsService, ICacheService cacheService, IMvcForumContext context) : base(loggingService, membershipService, localizationService, roleService, settingsService, cacheService, context) { _membershipUserPointsService = membershipUserPointsService; }
/// <summary> /// Constructor /// </summary> /// <param name="loggingService"> </param> /// <param name="localizationService"> </param> /// <param name="membershipUserPointsService"></param> /// <param name="context"></param> /// <param name="cacheService"></param> public BadgeService(ILoggingService loggingService, ILocalizationService localizationService, IMembershipUserPointsService membershipUserPointsService, IMvcForumContext context, ICacheService cacheService) { _loggingService = loggingService; _localizationService = localizationService; _membershipUserPointsService = membershipUserPointsService; _cacheService = cacheService; _context = context; }
public TagController(ILoggingService loggingService, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, ITopicTagService topicTagService, ICategoryService categoryService, ICacheService cacheService, IMvcForumContext context) : base(loggingService, membershipService, localizationService, roleService, settingsService, cacheService, context) { _topicTagService = topicTagService; _categoryService = categoryService; }
public AdminCategoryController(ILoggingService loggingService, IMvcForumContext context, IMembershipService membershipService, ILocalizationService localizationService, ICategoryService categoryService, ISettingsService settingsService) : base(loggingService, membershipService, localizationService, settingsService, context) { _categoryService = categoryService; }
/// <summary> /// Constructor /// </summary> public ActivityService(IBadgeService badgeService, ILoggingService loggingService, IMvcForumContext context, ICacheService cacheService, ITopicService topicService, IPostService postService, ICategoryService categoryService) { _badgeService = badgeService; _loggingService = loggingService; _cacheService = cacheService; _topicService = topicService; _postService = postService; _categoryService = categoryService; _context = context; }
public BatchController(ILoggingService loggingService, IMembershipService membershipService, ILocalizationService localizationService, ISettingsService settingsService, ICategoryService categoryService, ITopicService topicService, IPrivateMessageService privateMessageService, IMvcForumContext context) : base(loggingService, membershipService, localizationService, settingsService, context) { _categoryService = categoryService; _topicService = topicService; _privateMessageService = privateMessageService; }
public UploadController(ILoggingService loggingService, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, IPostService postService, IUploadedFileService uploadedFileService, ICacheService cacheService, IMvcForumContext context) : base(loggingService, membershipService, localizationService, roleService, settingsService, cacheService, context) { _postService = postService; _uploadedFileService = uploadedFileService; }
public AdminGroupController(ILoggingService loggingService, IMvcForumContext context, IMembershipService membershipService, ILocalizationService localizationService, IGroupService GroupService, ISettingsService settingsService) : base(loggingService, membershipService, localizationService, settingsService, context) { _groupService = GroupService; LoggedOnReadOnlyUser = membershipService.GetUser(System.Web.HttpContext.Current.User.Identity.Name, true); }
/// <summary> /// Constructor /// </summary> public ActivityService(ILoggingService loggingService, IMvcForumContext context, ICacheService cacheService, ITopicService topicService, IPostService postService, IGroupService GroupService) { _loggingService = loggingService; _cacheService = cacheService; _topicService = topicService; _postService = postService; _groupService = GroupService; _context = context; }
/// <summary> /// Constructor /// </summary> /// <param name="loggingService"> </param> /// <param name="badgeService"> </param> /// <param name="postService"> </param> /// <param name="membershipService"> </param> /// <param name="localizationService"></param> /// <param name="roleService"> </param> /// <param name="settingsService"> </param> /// <param name="favouriteService"></param> /// <param name="cacheService"></param> /// <param name="context"></param> public BadgeController(ILoggingService loggingService, IBadgeService badgeService, IPostService postService, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, IFavouriteService favouriteService, ICacheService cacheService, IMvcForumContext context) : base(loggingService, membershipService, localizationService, roleService, settingsService, cacheService, context) { _badgeService = badgeService; _postService = postService; _favouriteService = favouriteService; }
/// <inheritdoc /> public void RefreshContext(IMvcForumContext context) { _context = context; _membershipUserPointsService.RefreshContext(context); _settingsService.RefreshContext(context); _notificationService.RefreshContext(context); _favouriteService.RefreshContext(context); _postService.RefreshContext(context); _roleService.RefreshContext(context); _pollService.RefreshContext(context); }
public PrivateMessageController(ILoggingService loggingService, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, IPrivateMessageService privateMessageService, IEmailService emailService, IConfigService configService, ICacheService cacheService, IMvcForumContext context) : base(loggingService, membershipService, localizationService, roleService, settingsService, cacheService, context) { _privateMessageService = privateMessageService; _emailService = emailService; _configService = configService; }
/// <inheritdoc /> public void RefreshContext(IMvcForumContext context) { _context = context; _roleService.RefreshContext(context); _membershipUserPointsService.RefreshContext(context); _settingsService.RefreshContext(context); _voteService.RefreshContext(context); _uploadedFileService.RefreshContext(context); _favouriteService.RefreshContext(context); _postEditService.RefreshContext(context); }
public MarkAsSolutionReminderJob(ILoggingService loggingService, IEmailService emailService, IMvcForumContext context, ITopicService topicService, ISettingsService settingsService, ILocalizationService localizationService) { _loggingService = loggingService; _emailService = emailService; _context = context; _topicService = topicService; _settingsService = settingsService; _localizationService = localizationService; }