Browse Source

[FIX] import from old setup

16.0
Nicolas JEUDY 11 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( client_id = fields.Char(
string="Client ID", string="Client ID",
required=True, required=True,
readonly=True,
readonly=False,
index=True, index=True,
default=lambda _: random_tokens.lower_case(16), default=lambda _: random_tokens.lower_case(16),
) )
secret = fields.Char( secret = fields.Char(
string="Client secret", string="Client secret",
required=True, required=True,
readonly=True,
readonly=False,
default=lambda _: random_tokens.alpha_numeric(32), default=lambda _: random_tokens.alpha_numeric(32),
groups="galicea_openid_connect.group_admin", groups="galicea_openid_connect.group_admin",
) )

4
galicea_openid_connect/views/views.xml

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

Loading…
Cancel
Save