Index: SecurityComponent.cs
===================================================================
--- SecurityComponent.cs	(revision 6179)
+++ SecurityComponent.cs	(working copy)
@@ -32,6 +32,7 @@
 	/// </code>
 	/// </example>
 	/// </summary>
+	[ViewComponentDetails("Security", Sections="authorized,notauthorized")]
 	public class SecurityComponent : ViewComponent
 	{
 		private bool shouldRender;
@@ -42,43 +43,33 @@
 		/// </summary>
 		public override void Initialize()
 		{
-			string role = (string) ComponentParams["role"];
-			string roles = (string) ComponentParams["roles"];
+			string role = (string) (ComponentParams["role"] ??  ComponentParams["roles"]);
 
-			if (role == null && roles == null)
+			if (role == null )
 			{
 				throw new MonoRailException("SecurityComponent: you must supply a role (or roles) parameter");
 			}
 
-			shouldRender = IsInRole(role, roles);
+			shouldRender = IsInRole(role);
 		}
 
 		/// <summary>
 		/// Verify if the user is at least in one of the given role(s).
 		/// </summary>
-		/// <param name="role">string representing a role.</param>
-		/// <param name="roles">string (comma separated) representing an array of roles.</param>
+		/// <param name="role">string (comma separated) representing an array of roles.</param>
 		/// <returns><c>true</c> if the user is at least in one of the roles, otherwise <c>false</c>.</returns>
-		protected virtual bool IsInRole(string role, string roles)
+		protected virtual bool IsInRole(string role)
 		{
 			if (EngineContext.CurrentUser != null)
 			{
-				if (role != null)
+				foreach (string itRole in role.Split(','))
 				{
-					return EngineContext.CurrentUser.IsInRole(role);
-				}
-				else
-				{
-					foreach(string itRole in roles.Split(','))
+					if (EngineContext.CurrentUser.IsInRole(itRole.Trim()))
 					{
-						if (EngineContext.CurrentUser.IsInRole(itRole.Trim()))
-						{
-							return true;
-						}
+						return true;
 					}
 				}
 			}
-
 			return false;
 		}
 
@@ -90,8 +81,14 @@
 		{
 			if (shouldRender)
 			{
-				Context.RenderBody();
+				if (Context.HasSection("authorized"))
+					Context.RenderSection("authorized");
+				else
+					Context.RenderBody();
 			}
+			else
+				if (Context.HasSection("notauthorized"))
+					Context.RenderSection("notauthorized");
 		}
 	}
 }
