• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ISecurityManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: FleetManager

        public FleetManager(IShips ships, ISecurityManager securityManager)
        {
            if (ships == null) throw new ArgumentNullException("ships");
            if (securityManager == null) throw new ArgumentNullException("securityManager");

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


示例17: ContentSource

		public ContentSource(ISecurityManager security, params SourceBase[] sources)
		{
			this.security = security;
			
			var temp = sources.ToList();
			temp.Sort();
			Sources = temp;
		}
开发者ID:navneetccna,项目名称:n2cms,代码行数:8,代码来源:ContentSource.cs


示例18: AuthenticationController

        public AuthenticationController(ISessionManager sessionManager, ISecurityManager securityManager)
        {
            if (securityManager == null) throw new ArgumentNullException("securityManager");
            if (sessionManager == null) throw new ArgumentNullException("sessionManager");

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


示例19: SecurityEnforcer

 public SecurityEnforcer(Persistence.IPersister persister, ISecurityManager security, Definitions.IDefinitionManager definitions, Web.IUrlParser urlParser, Web.IWebContext webContext)
 {
     this.webContext = webContext;
     this.persister = persister;
     this.security = security;
     this.definitions = definitions;
     this.urlParser = urlParser;
 }
开发者ID:spmason,项目名称:n2cms,代码行数:8,代码来源:SecurityEnforcer.cs


示例20: SecurityEnforcer

 public SecurityEnforcer(Persistence.IPersister persister, ISecurityManager security, ContentActivator activator, Web.IUrlParser urlParser, Web.IWebContext webContext)
 {
     this.webContext = webContext;
     this.persister = persister;
     this.security = security;
     this.activator = activator;
     this.urlParser = urlParser;
 }
开发者ID:Jobu,项目名称:n2cms,代码行数:8,代码来源:SecurityEnforcer.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ISecurityObjectId类代码示例发布时间:2022-05-24
下一篇:
C# ISecurityContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap