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 6f2724a
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 6f2724a

Please sign in to comment.