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


C# ISecurityManager类代码示例

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


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

示例1: VersionAjaxService

        public VersionAjaxService(Navigator navigator, ContentVersionRepository versionRepository, IWebContext webContext, ISecurityManager security)
        {
            _navigator = navigator;
			_versionRepository = versionRepository;
            _security = security;
            _webContext = webContext;
        }
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:7,代码来源:VersionAjaxService.cs

示例2: ContentMessageSource

		public ContentMessageSource(IPersister persister, IIntegrityManager integrity, ISecurityManager security, IWebContext context)
		{
			this.persister = persister;
			this.integrity = integrity;
			this.security = security;
			this.context = context;
		}
开发者ID:EzyWebwerkstaden,项目名称:n2cms,代码行数:7,代码来源:ContentMessageSource.cs

示例3: CreateMockSecurityManager

 /// <summary>
 /// 创建模拟安全管理器
 /// </summary>
 private void CreateMockSecurityManager() {
     _mockSecurityManager = Substitute.For<ISecurityManager>();
     _mockSecurityManager.IsInApplication( _userId ).Returns( true );
     _mockSecurityManager.IsInTenant( _userId ).Returns( true );
     _mockSecurityManager.GetPermissionsByResource( _resourceUri )
         .Returns( new ResourcePermissions( _resourceUri, new List<Permission> { new Permission( _roleId,false ) } ) );
 }
开发者ID:NetUtil,项目名称:Util,代码行数:10,代码来源:PermissionManagerBaseTest.cs

示例4: CommandFactory

        public CommandFactory(IPersister persister, ISecurityManager security, IVersionManager versionMaker, IEditUrlManager editUrlManager, IContentAdapterProvider adapters, StateChanger changer)
        {
            this.persister = persister;
            makeVersionOfMaster = On.Master(new MakeVersionCommand(versionMaker));
            replaceMaster = new ReplaceMasterCommand(versionMaker);
            makeVersion = new MakeVersionCommand(versionMaker);
            useNewVersion = new UseNewVersionCommand(versionMaker);
            updateObject = new UpdateObjectCommand();
            delete = new DeleteCommand(persister.Repository);
            showPreview = new RedirectToPreviewCommand(adapters);
            showEdit = new RedirectToEditCommand(editUrlManager);
            useMaster = new UseMasterCommand();
            clone = new CloneCommand();
            validate = new ValidateCommand();
            this.security = security;
            save = new SaveCommand(persister);
            incrementVersionIndex = new IncrementVersionIndexCommand(versionMaker);
            draftState = new UpdateContentStateCommand(changer, ContentState.Draft);
            publishedState = new UpdateContentStateCommand(changer, ContentState.Published);
            saveActiveContent = new ActiveContentSaveCommand();
			moveToPosition = new MoveToPositionCommand();
			unpublishedDate = new EnsureNotPublishedCommand();
			publishedDate = new EnsurePublishedCommand();
			updateReferences = new UpdateReferencesCommand();
        }
开发者ID:navneetccna,项目名称:n2cms,代码行数:25,代码来源:CommandFactory.cs

示例5: AuthenticationService

 public AuthenticationService(IMembershipDataSource dataSource, IUserManager userManager, ISecurityManager securityManager, IAuthenticationCookieService cookieService)
 {
     this._dataSource = dataSource;
     this._userManager = userManager;
     this._securityManager = securityManager;
     this._cookieService = cookieService;
 }
开发者ID:StrixIT,项目名称:StrixIT.Platform.Modules.Membership,代码行数:7,代码来源:AuthenticationService.cs

示例6: CommandFactory

        public CommandFactory(IPersister persister, ISecurityManager security, IVersionManager versionMaker, IEditUrlManager editUrlManager, IContentAdapterProvider adapters, StateChanger changer)
        {
            //this.persister = persister;
            //makeVersionOfMaster = On.Master(new MakeVersionCommand(versionMaker));
            //showEdit = new RedirectToEditCommand(editUrlManager);
            //clone = new CloneCommand();
            //unpublishedDate = new EnsureNotPublishedCommand(); // moved to StateChanger
            //ensurePublishedDate = new EnsurePublishedCommand();  // moved to StateChanger

            this.security = security;
            
            save = new SaveCommand(persister);
            delete = new DeleteCommand(persister.Repository);

            replaceMaster = new ReplaceMasterCommand(versionMaker);
            makeVersion = new MakeVersionCommand(versionMaker);
            useDraftCmd = new UseDraftCommand(versionMaker);
            saveOnPageVersion = new SaveOnPageVersionCommand(versionMaker);

            draftState = new UpdateContentStateCommand(changer, ContentState.Draft);
            publishedState = new UpdateContentStateCommand(changer, ContentState.Published);

            updateObject = new UpdateObjectCommand();
            useMaster = new UseMasterCommand();
            validate = new ValidateCommand();
            saveActiveContent = new ActiveContentSaveCommand();
			moveToPosition = new MoveToPositionCommand();
			updateReferences = new UpdateReferencesCommand();
        }
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:29,代码来源:CommandFactory.cs

示例7: AsyncTrashPurger

 public AsyncTrashPurger(IWorker worker, ITrashHandler trash, IPersister persister, ISecurityManager security)
 {
     this.worker = worker;
     this.trash = trash;
     this.persister = persister;
     this.security = security;
 }
开发者ID:JohnsonYuan,项目名称:n2cms,代码行数:7,代码来源:AsyncTrashPurger.cs

示例8: MongoChatRepository

   public MongoChatRepository(IConfigurationHelper configurationHelper,
 ISecurityManager securityManager)
   {
       _configurationHelper = configurationHelper;
         _securityManager = securityManager;
         _database = ConnectToDatabase();
   }
开发者ID:progaddict,项目名称:Chat,代码行数:7,代码来源:MongoChatRepository.cs

示例9: VimeoChannel

 public VimeoChannel(IHttpClient httpClient, IJsonSerializer jsonSerializer, ILogManager logManager, ISecurityManager securityManager)
 {
     _httpClient = httpClient;
     _logger = logManager.GetLogger(GetType().Name);
     _jsonSerializer = jsonSerializer;
     _securityManager = securityManager;
 }
开发者ID:Techywarrior,项目名称:MediaBrowser.Channels,代码行数:7,代码来源:VimeoChannel.cs

示例10: AuthorityManager

       // private UserInfo userInfo = new UserInfo();

        public AuthorityManager()
        {
            //
            //TODO: 在此处添加构造函数逻辑
            //
            //TcpClientChannel channel = new TcpClientChannel();
            //ChannelServices.RegisterChannel(channel, false);

            //string strRBPCServiceURL = ConfigurationManager.AppSettings["RBPC.Service.url"].ToString();
            //string strRBPCServicePort = ConfigurationManager.AppSettings["RBPC.Service.port"].ToString();
            string strRBPCServiceURL = ConfigurationManager.AppSettings["RBPCServiceAddress"].ToString();
            string strRBPCServicePort = ConfigurationManager.AppSettings["RBPCServicePort"].ToString();
            //string tcpChannel = "tcp://" + strRBPCServiceURL + ":" + strRBPCServicePort + "/";


            string strAccountMgrURL = "tcp://" + strRBPCServiceURL + ":" + strRBPCServicePort + "/IAccountManager";
            log.Debug("*-*-strAccountMgrURL=" + strAccountMgrURL);
            string strPermissionMgrURL = "tcp://" + strRBPCServiceURL + ":" + strRBPCServicePort + "/IPermissionManager";
            log.Debug("*-*-strPermissionMgrURL=" + strPermissionMgrURL);
            string strRoleMgrURL = "tcp://" + strRBPCServiceURL + ":" + strRBPCServicePort + "/IRoleManager";
            log.Debug("*-*-strRoleMgrURL=" + strRoleMgrURL);
            string strSecurityMgrURL = "tcp://" + strRBPCServiceURL + ":" + strRBPCServicePort + "/ISecurityManager";
            log.Debug("*-*-strSecurityMgrURL=" + strSecurityMgrURL);


            accountMgr = (IAccountManager)Activator.GetObject(typeof(IAccountManager), strAccountMgrURL);
            permissionMgr = (IPermissionManager)Activator.GetObject(typeof(IPermissionManager), strPermissionMgrURL);
            roleMgr = (IRoleManager)Activator.GetObject(typeof(IRoleManager), strRoleMgrURL);
            securityMgr = (ISecurityManager)Activator.GetObject(typeof(ISecurityManager), strSecurityMgrURL);
            application = System.Configuration.ConfigurationManager.AppSettings.Get("RBPCApplication").ToString();

        }
开发者ID:wra222,项目名称:testgit,代码行数:34,代码来源:AuthorityManager.cs

示例11: IsPermitted

 private static bool IsPermitted(ISecurityManager security, object possiblyPermittable, IPrincipal user, ContentItem item)
 {
     var permittable = possiblyPermittable as IPermittable;
     if (permittable != null && permittable.RequiredPermission > Permission.Read && !security.IsAuthorized(user, item, permittable.RequiredPermission))
         return false;
     return true;
 }
开发者ID:FloatLeft,项目名称:n2cms,代码行数:7,代码来源:SecurableExtensions.cs

示例12: CheckPermission

 /// <summary>
 /// Checks whether the user can perform the specified action.
 /// </summary>
 /// <param name="userName">The name of the user that is being checked.</param>
 /// <param name="permission">The permission to check.</param>
 /// <param name="defaultRight">The default right to use.</param>
 /// <param name="manager"></param>
 /// <returns>True if the permission is valid, false otherwise.</returns>
 public virtual bool CheckPermission(ISecurityManager manager, 
     string userName, 
     SecurityPermission permission,
     SecurityRight defaultRight)
 {
     return true;
 }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:15,代码来源:NullProjectAuthorisation.cs

示例13: CheckPermission

 /// <summary>
 /// Checks whether the user can perform the specified action.
 /// </summary>
 /// <param name="userName">The name of the user that is being checked.</param>
 /// <param name="permission">The permission to check.</param>
 /// <param name="defaultRight">The default right to use.</param>
 /// <param name="manager"></param>
 /// <returns>True if the permission is valid, false otherwise.</returns>
 public virtual bool CheckPermission(ISecurityManager manager,
     string userName,
     SecurityPermission permission,
     SecurityRight defaultRight)
 {
     return manager.CheckServerPermission(userName, permission);
 }
开发者ID:kascomp,项目名称:CruiseControl.NET,代码行数:15,代码来源:InheritedProjectAuthorisation.cs

示例14: DefaultIntroProvider

 public DefaultIntroProvider(ISecurityManager security, IChannelManager channelManager, ILocalizationManager localization, IConfigurationManager serverConfig, ILibraryManager libraryManager)
 {
     _security = security;
     _channelManager = channelManager;
     _localization = localization;
     _serverConfig = serverConfig;
     _libraryManager = libraryManager;
 }
开发者ID:jrags56,项目名称:MediaBrowser,代码行数:8,代码来源:DefaultIntroProvider.cs

示例15: EmpireManager

        public EmpireManager(IEmpires empireRepository, ISecurityManager securityManager)
        {
            if (empireRepository == null) throw new ArgumentNullException("empireRepository");
            if (securityManager == null) throw new ArgumentNullException("securityManager");

            _empireRepository = empireRepository;
            _securityManager = securityManager;
        }
开发者ID:ardliath,项目名称:BigSpace,代码行数:8,代码来源:EmpireManager.cs


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