/// <summary> /// Determines the current user has right for selected object name(key). /// </summary> /// <param name="objectName">Object key name that need to be validated to has right.</param> /// <returns>Returns true if user has right for selected object, otherwise false.</returns> public bool HasPermissionFor(string objectName) { if (string.IsNullOrWhiteSpace(objectName)) { return(false); } if (objectName.Equals(Keys.Security.CommonScreens)) { return(true); } return(!string.IsNullOrWhiteSpace(Rights.FirstOrDefault(r => r.Equals(objectName)))); }