Skip to content

Commit

Permalink
fix: Application Sign Up and Sign In fields for organisation (#86)
Browse files Browse the repository at this point in the history
The Application entity found at org.casbin.casdoor.entity.Application is missing required fields that are needed to correctly load the OAuth2 page and admin dashboard.

Fields missing are:

- Sign Up Items
- Sign In Items
- Sign In Methods

Due to these missing fields the database is holding null. This results with a front-end error as the UI is expecting an array (even if it's an empty array) in comparison to null for both the OAuth2 login page, and the Admin Dashboard.
  • Loading branch information
CameronMukherjee committed Sep 22, 2024
1 parent 391e3d2 commit b1e2750
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/main/java/org/casbin/casdoor/entity/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public class Application implements Serializable {
public int formOffset;
public String formSideHtml;
public String formBackgroundUrl;
public List<SigninMethod> signinMethods;
public List<SigninItem> signinItems;
public List<SignupItem> signupItems;

public Application() {
}
Expand All @@ -71,4 +74,32 @@ public Application(String owner, String name, String createdTime, String display
this.description = description;
this.organization = organization;
}

public static class SigninMethod {
public String name;
public String displayName;
public String rule;
}

public static class SigninItem {

public String name;
public boolean visible;
public String label;
public String placeholder;
public String rule;
public boolean isCustom;
}

public static class SignupItem {

public String label;
public String name;
public String placeholder;
public boolean prompted;
public String regex;
public boolean required;
public String rule;
public boolean visible;
}
}

0 comments on commit b1e2750

Please sign in to comment.