Authorization Logging #24

Record 'Access Denied' and any changes to Authorization Roles.
This commit is contained in:
Gary Sharp
2013-10-15 16:13:41 +11:00
parent 7b62eabeee
commit 017b1435d8
14 changed files with 515 additions and 223 deletions
@@ -8,26 +8,36 @@ namespace Disco.Services.Authorization
{
public class AccessDeniedException : Exception
{
private string _message { get; set; }
private string message { get; set; }
private string resource { get; set; }
public AccessDeniedException(string Message)
public AccessDeniedException(string Message, string Resource)
{
this._message = Message;
this.message = Message;
this.resource = Resource;
}
public override string Message
{
get
{
if (this._message == null)
if (this.message == null)
{
return "Your account does not have the required permission to access this Disco feature.";
}
else
{
return this._message;
return this.message;
}
}
}
public string Resource
{
get
{
return this.resource;
}
}
}
}