Browse Source

Consts fixed, super stupid error

pull/1/head
Sebastian 9 years ago
parent
commit
896e79f761
  1. 8
      src/Squidex.Core/Identity/SquidexRoles.cs
  2. 2
      src/Squidex.Write/Schemas/Commands/AddField.cs
  3. 2
      src/Squidex.Write/Schemas/Commands/CreateSchema.cs
  4. 2
      src/Squidex.Write/Schemas/SchemaCommandHandler.cs
  5. 2
      src/Squidex/Config/Identity/IdentityUsage.cs
  6. 2
      src/Squidex/Config/Identity/LazyClientStore.cs

8
src/Squidex.Core/Identity/SquidexRoles.cs

@ -10,12 +10,12 @@ namespace Squidex.Core.Identity
{
public static class SquidexRoles
{
public static readonly string Administrator = "ADMINISTRATOR";
public const string Administrator = "ADMINISTRATOR";
public static readonly string AppOwner = "APP-OWNER";
public const string AppOwner = "APP-OWNER";
public static readonly string AppEditor = "APP-EDITOR";
public const string AppEditor = "APP-EDITOR";
public static readonly string AppDeveloper = "APP-DEVELOPER";
public const string AppDeveloper = "APP-DEVELOPER";
}
}

2
src/Squidex.Write/Schemas/Commands/AddField.cs

@ -22,7 +22,7 @@ namespace Squidex.Write.Schemas.Commands
{
if (!Name.IsPropertyName())
{
errors.Add(new ValidationError("DisplayName must be a valid property name", nameof(Name)));
errors.Add(new ValidationError("Name must be a valid property name", nameof(Name)));
}
if (Properties == null)

2
src/Squidex.Write/Schemas/Commands/CreateSchema.cs

@ -48,7 +48,7 @@ namespace Squidex.Write.Schemas.Commands
{
if (!Name.IsSlug())
{
errors.Add(new ValidationError("DisplayName must be a valid slug", nameof(Name)));
errors.Add(new ValidationError("Name must be a valid slug", nameof(Name)));
}
}
}

2
src/Squidex.Write/Schemas/SchemaCommandHandler.cs

@ -35,7 +35,7 @@ namespace Squidex.Write.Schemas
if (await schemas.FindSchemaByNameAsync(command.AppId.Id, command.Name) != null)
{
var error =
new ValidationError($"A schema with name '{command.Name}' already exists", "DisplayName",
new ValidationError($"A schema with name '{command.Name}' already exists", "Name",
nameof(CreateSchema.Name));
throw new ValidationException("Cannot create a new schema", error);

2
src/Squidex/Config/Identity/IdentityUsage.cs

@ -96,7 +96,7 @@ namespace Squidex.Config.Identity
public static IApplicationBuilder UseMyApiProtection(this IApplicationBuilder app)
{
const string apiScope = Constants.ApiScope;
var apiScope = Constants.ApiScope;
var urlsOptions = app.ApplicationServices.GetService<IOptions<MyUrlsOptions>>().Value;

2
src/Squidex/Config/Identity/LazyClientStore.cs

@ -93,7 +93,7 @@ namespace Squidex.Config.Identity
private static IEnumerable<Client> CreateStaticClients(MyUrlsOptions urlsOptions)
{
const string id = Constants.FrontendClient;
var id = Constants.FrontendClient;
yield return new Client
{

Loading…
Cancel
Save