mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 13:20:19 +08:00
feat: add organization context select box for admin (#2013)
* feat: organization as context * feat: organization as context with backend filtration * Update app.conf * update app.conf and hide organization select for mobile. --------- Co-authored-by: dplynsky <dplynsky@ptsecurity.com> Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
@ -25,11 +25,12 @@ import PopconfirmModal from "./common/modal/PopconfirmModal";
|
||||
class WebhookListPage extends BaseListPage {
|
||||
newWebhook() {
|
||||
const randomName = Setting.getRandomName();
|
||||
const organizationName = Setting.getRequestOrganization(this.props.account);
|
||||
return {
|
||||
owner: "admin", // this.props.account.webhookname,
|
||||
name: `webhook_${randomName}`,
|
||||
createdTime: moment().format(),
|
||||
organization: this.props.account.owner,
|
||||
organization: organizationName,
|
||||
url: "https://example.com/callback",
|
||||
method: "POST",
|
||||
contentType: "application/json",
|
||||
@ -240,7 +241,7 @@ class WebhookListPage extends BaseListPage {
|
||||
value = params.contentType;
|
||||
}
|
||||
this.setState({loading: true});
|
||||
WebhookBackend.getWebhooks("admin", Setting.isAdminUser(this.props.account) ? "" : this.props.account.owner, params.pagination.current, params.pagination.pageSize, field, value, sortField, sortOrder)
|
||||
WebhookBackend.getWebhooks("admin", Setting.isDefaultOrganizationSelected(this.props.account) ? "" : Setting.getRequestOrganization(this.props.account), params.pagination.current, params.pagination.pageSize, field, value, sortField, sortOrder)
|
||||
.then((res) => {
|
||||
this.setState({
|
||||
loading: false,
|
||||
|
Reference in New Issue
Block a user