Cool privilege control system part 1 — asp. net mvc – codeproject sql server sql

Cool privilege control system part 1 — asp. net mvc – codeproject sql server sql Angular Single-Page Applications – Cool Privilege Control System Introduction As we know, Privilege control is a common and basic mechanism. What is an sql server People would be allocated into different access’s roles. Use database sql server Some of who can maintain sensitive information based on their role, and the other cannot. Ms sql server features It is the same as the computer world. Sql express server 2012 For example, Microsoft Window, a famous PC OS, it has a user management system in it, different users login with different access rights and operate different files or folders, the OS administrator can create different user accounts with different privileges.

Sql server user group E.g.


Cost of sql server Ricky is an administrator and Jenny is a guest, both of who launch the system are based on their Login Name and Password, Ricky can control everything of the computer and Jenny does not have any permission except view right. Sql server topics In order to solve the complex cases, we need to develop a system to help us. Using sql server express It is also plain to see that the Privilege Right Control is a basic mechanism on the top of the other systems. Sql server migration Background For Privilege Right Control is a basic mechanism, it should be implemented already. Editions of sql server Many guys will have the following question “Why do you discuss here?

Do you know to waste our times? “. Start sql server express And the answer I want to say is “No”. Sql server update As many year experiences, I have participated in developing many projects and most of those have its access right control except mini system.

Sql server information Take HR Management System as an example. HR Management System has a lot of sensitive information and there are many different modules in it. What is sql database server Such as ESS (Employee self-service), Leave module, Payroll module, Attendance module, and so on. Meaning of sql server All of those modules should have access right controls. Use of in sql server In the past, we used to create different access right control systems for different modules.

For in sql server 2008 That means if a user named Jenny, she should have more than five accounts for this HR Management System. For en sql server 2008 It is not only hard for Jenny to remember these accounts but also hard to maintenance. How sql server stores data Furthermore, most of existing systems do not cover all the real cases. Sql server 2012 r2 express with tools E.g. Or sql server Jenny is a sales manager, she can only access people under her team and she cannot access other team colleagues.

Go sql server So today I introduce Cool Privilege Control for who has the same questions as I met. Cool Privilege Control I designed is used to centralize function’s and user’s operations and resolve different access levels problems. Is sql server a database It looks like Single Sign On system and it is based on asp.net MVC, but it is not limited on web application only, since I splitted the solution into many tiers, UI(User Interface MVC), BL(Business Layer) and DAL(Data Access Layer). Ms sql server administration It is easy to replace UI from MVC to Window Application (WPF) and combine BL with DAL into WCF. And if you are a MVC developer, cool privilege control does not only provide a single sign on solution to you, but also provide a prototype’s scaffolding project to you. Sql server express edition 2008 Feature • Resolve normal access control issues. Sql server 2008 r2 express edition (i.e. Sql server courses user and user role, function and function type).

• Resolve user with different organizations has different access levels problems. • Easily and quickly create a prototype with privilege control and auto-generating menu. First of all, I captured some screens of the application in order to increase study concentration.

It is pretty cool, right? Thanks Bootstrap! That is a beautiful UI toolkit which helps developer to cut down lots of work!

From now on, we will go a little deep to analyze all of scenarios about access control in real life. Start sql server express Scenarios 5.1 Scenario 1 System has many functions, each function has many function types (i.e. Microsoft sql server 2005 express edition insert, update, import, export and so on), which can be assigned to different functions, That means Function A has a import method, Function B has a import method as well.

Sql server group by month So the relationship between function and function type is many to many. Sql 2012 server It is easy to describe the entity relationship as the following diagram. Login user can be assigned to specific functions or specific roles. Sql server 2005 editions If a login user is assigned to multi roles, then the user can access all functions which defined in those roles.

What is sql server database That means Role A has access right on Function A, Role B has access right on Function B, if both Role A and Role B are assigned to a user named “Ricky”, then Ricky can access Function A and Function B. Sql server express update Below figure is the user-role entity relationship. Each user can be assigned to one or more specific organizations, if you do that, he/she can only be allowed to access his/her subordinates information. Sql server log To resolve these problems, we should create a new entity called “Organization Detail” which helps system to store privileges for organization assignment.

Sql server version 9 That maybe not easy to recognize. Sql server help Take actual case as an example which is easy to be recognized.

• A user named “Angus” and his bussiness title is Project Manager and Sales Assistant Manager. Full access right on function “Login User Management” with Project Manager Level. Read-only right on function “Login User Management” with Sales Assistant Manager Level. When Angus logined into the system, he can access two functions, one is “Function Management” and the other is “Login User Management”.

Sql server compact edition According to the settings, Angus only has search right and view right on “Function Management”. Sql server classes Meanwhile, On function “Login User Management”, Angus can insert/update/delete user’s records which are project team members, however, he cannot insert/update/delete user’s records which are under sale team members except view and search. According to above case, we should set two organization details settings, the one is “ReadOnly” and the other is “Login User Full Access”. Latest ms sql server version Below screens show organization details settings.

Description: As above screen described, both edit and delete button are dimed, in which login name is Angus or Michael, because Angus cannot maintain the users under Sale Team Member and himself, but he can maintain the users under Project Team. In order to fulfill MSSQL and MYSQL database developer, I publish two versions of the project. Sql server software If you use MSSQL as default, please download ” CoolAccessControl.Community.

MYSQL.zip”, otherwise, please download ” CoolAccessControl.Community.MSSQL.

zip”. Sql server manager And I listed my development environment for your reference. Sql server 11 If your local development environment is low than me, I suggest you should upgrade the environment first so that you can run the program successfully. If your local version is equal or above my development environment, there are no compatibility issues I trusted. Mandatory Step: After opened solution, please right click solution and select “Enable NuGet Package Restore”.

Please pay attention to the appSettings node, change DBSource/DBName/DBPort/LoginName/LoginPWD value based on mysql server settings. Sql server 2005 download Property If you set true, all exception will be showed on the page, and vice versa.

The same as mysql user, change DBSource/DBName/LoginName/LoginPWD value based on mssql server settings, except DBPort. With in sql server In mssql server, the port number can be specified after the server name or server ip address with comma. For sql server E.g. WELLSCHEUNG\MSSQLSERVER2012,49287 49287 is the port.

Ms sql server online Property If you set true, whatever exception will be show on the page, and vice versa. That is the feature of entity framework code first design pattern. Sql server where and And it is the most useful I ever heard before. Where sql server When you executed the project, if database instance did not exist in the server and the flag is enabled, entity framework would help you to initialize the db scheme.

Sql server 2005 sp3 For more information please refer to MSDN( https://msdn.microsoft.com/en-us/data/ee712907). Or en sql server If you do not want to initial database automatically and cover your database, you can set the attribute “disableDatabaseInitialization” in context element to true.

Alternative, you can initialize DB via sql script or database backup. On sql server I prepare sql script for mysql user to execute and database backup for mssql user to restore. MSSql Database Backup ( Change file’s extension to “.bak” ) 6.2 Edit Log4Net.config file We use log4net to help us record the trace infos and the error infos.

In en sql server About how to use log4net, I though most of you had more experiences than me, so I do not want to spend many times on repeat. For sql server I only specified that all functions in the system enable trace log as default (i.e. Sql server where in Include both input and output information).

As in sql server That is an easy way to trace error even if we cannot run visual studio debug when onsite support. It is easy to turn off or change another types of information which you wanted to capture. Sql server training There are seven levels type which were pre-setted in log4net. The following levels were defined as an increasing priority order You can replace the value of the attribute “level” to above level in log4net.

config. As said before, previous settings will affect all the functions in the system. Different versions of sql server If you want to disable the logger individually. Sql server and or You can mark the function as “[UnTracerAction]” function, then the function will not be traced.

After previously settings, System is ready to use. Sql server security Press “F5” in Visual Studio and double check if it has any compile errors or not. Sql server express 2010 If any errors came out, you can send the error to me for inspection or search solution in google by yourself. Next section, I will introduce functions in the system. What is sql server 2008 Include create function types, create functions, create login users, create roles, create organizations, create access levels, assign functions to specific login user and so on. Learn sql server 2008 How To Use 7.1 System Settings 1. Sql server express versions Click sub menu “System Info Management” in main menu “Access Management”.

Default value is 10 mins = 600 seconds. Ms sql server free Cool Privilege Control has a seseion management mechanism which is relayed on asp.net session management mechanism, that means, if you change the value to 20 mins or more than 20 mins, any session will only alive in 20 mins without user operation. Sql server express advanced Because the idle time is 20 mins by default in asp.net. Where sql server If you want to set session timeout more than 20 mins, you must set the session timeout of asp.net bigger than session timeout of cool privilege control system.

With sql server About how to change session timeout in asp.net please refer to https://msdn.microsoft.com/en-us/library/h6bb9cz9(v=vs.100).aspx . Group by month sql server I used to extend asp.net session timeout to 60 mins.

It contains many rules. Sql server 2000 download I think it cover normal usage and I don’t want to spend many times to explain each rule here.

Sql server faq I trust all of you have ability to understand the rule. Cool Privilege Control allows user create function type directly. Ms sql server 2012 price View, Search, Create, Edit, Delete, Export, Import, Preview and Process are the most frequency function types.

To avoid wasteful duplication of effort, System would add these function types after db was initialized. Click Create Function Type button in bottom left of the Function Type Management page.

As section 5 described, Cool Privilege Control use “000100010001” format to separate functions. Sql server express edition 2012 In theory, system supports unlimited function levels and 9999 functions for each function level. Click Create Function button in bottom left of the Function Management page. Type Function Key and Function Path select Function Type which belongs to this function.

Click Create User Role button in bottom left of the Role Management page. Click Create Organization button in bottom left of the Organization Management page.

Click Create Organization Details button in bottom left of the Organization Details Management page. There are two types of organization details. Free sql server One is “Specific Functions”, the other is “As Role Settings”. Sql server r2 You can assign specific function into it, or set as role settings.

Click Create Login User button in bottom left of the Login User Management page. Type mandatory fields. Sql for sql server Such as Login Name / Password / Confirm Password / Status. As Organization Settings: Assign organization unit with correlative organization details to the user.

In this function, you can retrieve all events recorded by system and filter what you want via selection criteria. Ms sql server express More, you can export the log as excel file for inspection.

As first section mentioned, Cool Privilege Control is based on multi language design pattern. Sql server 2008 free Currently, there are three languages in the system.

What is an sql server English, Simplified Chinese and Traditional Chinese. Microsoft sql server 2005 express edition We can extend language package via add resource file.

Sql server server I hope you can help me to add more language package into the system. Sql server 6 You can send your resource file to my email( wells-z@hotmail.com or wellscheung@gmail.

com), I will consolidate all resource files and inject into the system. Learn sql server Following section will talk about how to create localized version of resource files. Sql server query 7.10.1 Create localized version of resource files We need to create three categories of resource files. Sql server ce There are FunctionRes.

resx, lblCommon.resx and MsgRes.

resx. In Solution Explorer right-click the project, point to Add, and then click New Item. In the Add New Item dialog box, select Resources File and name the file FunctionRes.de-de.resx.

Sql sql server The file name indicates the language, German, and the country, Germany. If you do not know country code and language code.

What is sql server used for Please visit blew link We have to create three files for each language and each country. Open Resource Designer change Access Modifier to “No code generation” and copy all key-value pairs from base resource file to the new resource file.

Translate all sentences in Value column to your local language. Save file and repeat the same action to create the remain files. Send the above three files to me ( wells-z@hotmail.

com or wellscheung@gmail.com). Online ms sql server And I will consolidate other guy’s resources and publish a new version with your language pack to the site.

What is a sql server Thank ypu. For guys who wants to test the system immediately or traces bug. Free sql server I created a testing site. Msft sql server Please visit http://www.wellscom.

net. Sql server express advanced services In order to protect our testing site, I have to lock the admin account and functions which function path starts with “0004”. Pass sql server And the site data will restore in midnight of American East. Cool Privilege Control System is using the test-driven development (TDD) approach.

Sql server convert For many companys, TDD is a mandatory approach in repetition development cycle. Transact sql server Cool Privilege Control System contains 40 test cases in all Controllers, you can easily test all functions by clicking “Run All” in Test Explorer. Sql server group by month Certainly, you can add new test case or add new conditions into the orignial test case based on your requriements. All sql server Cool Privilege Control System uses Xunit and Mock.

Ms sql server 2012 express edition Xunit is a test framework and is injected into Visual Studio, as the same as MSTest and Nunit. Sql server 2000 download For more infos, you can visit the official site. Cool Privilege Control based on many interesting design pattern. What is a sql server Such as MVC, MEF, Entity Framework, jQuery and Bootstrap(UI). What is database in sql server I am sorry I cannot introduce all of these design patterns to you in a short time.

Sql server 2012 professional If you have any questions about Cool Privilege Control. Sql server cluster Feel free and contact me. Sql server port Thanks for your reading. What is an sql server History 2016-02-01 Change project from “Cool Access Control” to “Cool Privilege Control”,Fixed bugs as well as display issue.

2016-03-01 Merge with WCF Service Version and add Testing project. I’m trying to run this project in my computer, however, after I restore Nuget packages, I’ve got this errors among 3 others. Sql server enterprise On top of that, I’ve got 129 warnings. This project references NuGet package(s) that are missing on this computer.

Sql server server Enable NuGet Package Restore to download them. With sql server 2008 For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.

Sql server free The missing file is C:\Users\paris\Downloads\CoolPrivilegeControl.Community.

MSSQL\\.nuget\NuGet.targets. What I have noticed is that all my references are throwing a warning message…

Sql server web license Ican’t neither update them nor re-install them. Latest sql server If I remove one of them, Nuget Manager won’t recognize it… What is in sql server What am I doing wrong? Unable to load one or more of the requested types. Sql express server Retrieve the LoaderExceptions property for more information.

I was going through your code and it looks like, you have used few references in your code like i don’t see the code for the following libraries, can you please share the complete code used for this article. Do you have The Cool Privilege Control System designed by web form? This morning I started doing some work on my application which uses your Privilege control system and started getting application errors. The assembly UI_Infrastructure.

dll has been built with an evaluation version of Eazfuscator.NET, which has expired.

If something has a solution… Sql server 2000 enterprise Why do we have to worry about?. Definition of sql server If it has no solution…

Sql server web license For what reason do we have to worry about? Help me to understand what I’m saying, and I’ll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer. Site: http://www.codeproject.com/Articles/1074801/Cool-Privilege-Control-System-Part-ASP-NET-MVC

banner