Browse Source

[FIX] import from old setup

16.0
Nicolas JEUDY 10 months ago
parent
commit
7fae4c5a0a
  1. 4
      galicea_openid_connect/models/client.py
  2. 4
      galicea_openid_connect/views/views.xml

4
galicea_openid_connect/models/client.py

@ -13,14 +13,14 @@ class Client(models.Model):
client_id = fields.Char(
string="Client ID",
required=True,
readonly=True,
readonly=False,
index=True,
default=lambda _: random_tokens.lower_case(16),
)
secret = fields.Char(
string="Client secret",
required=True,
readonly=True,
readonly=False,
default=lambda _: random_tokens.alpha_numeric(32),
groups="galicea_openid_connect.group_admin",
)

4
galicea_openid_connect/views/views.xml

@ -22,10 +22,10 @@
<group>
<field name="name" />
<field name="create_date" invisible="1"/>
<field name="client_id"
<field name="client_id" readonly="1"
attrs="{'invisible':[('create_date', '==', False)]}" />
<label for="secret" string="Client Secret" />
<field name="secret" nolabel="1" />
<field name="secret" readonly="1" nolabel="1" />
<field name="auth_redirect_uri" />
<field name="allow_password_grant" />
</group>

Loading…
Cancel
Save