diff options
| author | Michael <[email protected]> | 2017-04-04 18:54:59 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-04-04 18:54:59 -0400 |
| commit | 303ef44a189a120f956eb020858d5b5483aa4b69 (patch) | |
| tree | 78f648a83c1ec79fd5dace66ffa3dd57e79aab2c /Project-Unite | |
| parent | 35aa49e73f0b4c02811a6ed8216088322ab8baeb (diff) | |
| download | project-unite-303ef44a189a120f956eb020858d5b5483aa4b69.tar.gz project-unite-303ef44a189a120f956eb020858d5b5483aa4b69.tar.bz2 project-unite-303ef44a189a120f956eb020858d5b5483aa4b69.zip | |
Patch ACL.UserLink
Assume system user if no user matching the ID was found.
Diffstat (limited to 'Project-Unite')
| -rw-r--r-- | Project-Unite/ACL.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Project-Unite/ACL.cs b/Project-Unite/ACL.cs index 36eba6e..39c58de 100644 --- a/Project-Unite/ACL.cs +++ b/Project-Unite/ACL.cs @@ -113,7 +113,8 @@ namespace Project_Unite using(var db = new ApplicationDbContext()) { var usr = db.Users.Include(x=>x.Roles).FirstOrDefault(x => x.Id == userId); - + if (usr == null) + return hpr.Raw("<a href=\"#\">system</a>"); var userRoles = new List<Role>(); foreach (var usrRole in usr.Roles) { |
