Beispiel #1
0
 public AuthorityManager()
 {
     permissionManager = RBPCAgent.getRBPCManager<IPermissionManager>();
     securityManager = RBPCAgent.getRBPCManager<ISecurityManager>();
     roleManager = RBPCAgent.getRBPCManager<IRoleManager>();
     accountManager = RBPCAgent.getRBPCManager<IAccountManager>();
     appName = ConfigurationManager.AppSettings["RBPCApplication"].ToString();
     accountManagerEx = RBPCAgent.getRBPCManager<IAccountRoleEx>();
 }
Beispiel #2
0
        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);
			
			string strAccountRoleExURL = "tcp://" + strRBPCServiceURL + ":" + strRBPCServicePort + "/IAccountRoleEx";
            log.Debug("*-*-strAccountRoleExURL=" + strAccountRoleExURL);


            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();
			accountRoleEx = (IAccountRoleEx)Activator.GetObject(typeof(IAccountRoleEx), strAccountRoleExURL);

        }
Beispiel #3
0
        public AuthorityManager(UserInfo ui)
            : this()
        {
            string strRBPCServiceURL = ConfigurationManager.AppSettings["RBPCServiceAddress"].ToString();
            string strRBPCServicePort = ConfigurationManager.AppSettings["RBPCServicePort"].ToString();


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


            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();
            editorID = ui.AccountId;//31989
			accountRoleEx = (IAccountRoleEx)Activator.GetObject(typeof(IAccountRoleEx), strAccountRoleExURL);
            userInfo = ui;
        }
Beispiel #4
0
        public AuthorityManager(string strEditorID)
        {
            string strRBPCServiceURL = ConfigurationManager.AppSettings["RBPCServiceAddress"].ToString();
            string strRBPCServicePort = ConfigurationManager.AppSettings["RBPCServicePort"].ToString();


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


            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();
            // TODO: Complete member initialization
            editorID = Int64.Parse(strEditorID);
			accountRoleEx = (IAccountRoleEx)Activator.GetObject(typeof(IAccountRoleEx), strAccountRoleExURL);
        }