Skip to content

Commit 42e4dae

Browse files
feat: add missing Sign Up and Sign In items fields in Application (#87)
* fix: Application Sign Up and Sign In fields for organisation (#86) 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. * Update Application.java --------- Co-authored-by: Yang Luo <[email protected]>
1 parent 391e3d2 commit 42e4dae

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

src/main/java/org/casbin/casdoor/entity/Application.java

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ public class Application implements Serializable {
5757
public int formOffset;
5858
public String formSideHtml;
5959
public String formBackgroundUrl;
60+
public List<SigninMethod> signinMethods;
61+
public List<SigninItem> signinItems;
62+
public List<SignupItem> signupItems;
6063

6164
public Application() {
6265
}
@@ -71,4 +74,30 @@ public Application(String owner, String name, String createdTime, String display
7174
this.description = description;
7275
this.organization = organization;
7376
}
74-
}
77+
78+
public static class SigninMethod {
79+
public String name;
80+
public String displayName;
81+
public String rule;
82+
}
83+
84+
public static class SigninItem {
85+
public String name;
86+
public boolean visible;
87+
public String label;
88+
public String placeholder;
89+
public String rule;
90+
public boolean isCustom;
91+
}
92+
93+
public static class SignupItem {
94+
public String label;
95+
public String name;
96+
public String placeholder;
97+
public boolean prompted;
98+
public String regex;
99+
public boolean required;
100+
public String rule;
101+
public boolean visible;
102+
}
103+
}

0 commit comments

Comments
 (0)