.NET MVC razor permission management
up vote
0
down vote
favorite
I'm looking for library or code implementation like casl js (permission management) in c#.
In my views has much content that depending on user roles...
I'm trying to get rid of all if checks for user role and call one method that should take decision which data to display.
Here is JavaScript example:
if (ability.can('delete', post)) {
<button onClick={this.deletePost.bind(this}>Delete</button>
}
asp.net-mvc razor user-roles casl
add a comment |
up vote
0
down vote
favorite
I'm looking for library or code implementation like casl js (permission management) in c#.
In my views has much content that depending on user roles...
I'm trying to get rid of all if checks for user role and call one method that should take decision which data to display.
Here is JavaScript example:
if (ability.can('delete', post)) {
<button onClick={this.deletePost.bind(this}>Delete</button>
}
asp.net-mvc razor user-roles casl
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm looking for library or code implementation like casl js (permission management) in c#.
In my views has much content that depending on user roles...
I'm trying to get rid of all if checks for user role and call one method that should take decision which data to display.
Here is JavaScript example:
if (ability.can('delete', post)) {
<button onClick={this.deletePost.bind(this}>Delete</button>
}
asp.net-mvc razor user-roles casl
I'm looking for library or code implementation like casl js (permission management) in c#.
In my views has much content that depending on user roles...
I'm trying to get rid of all if checks for user role and call one method that should take decision which data to display.
Here is JavaScript example:
if (ability.can('delete', post)) {
<button onClick={this.deletePost.bind(this}>Delete</button>
}
asp.net-mvc razor user-roles casl
asp.net-mvc razor user-roles casl
asked 5 hours ago
Aleksandar Aleksandrov
63
63
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53266034%2fnet-mvc-razor-permission-management%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password