Skip to content

Commit

Permalink
Merge PR #401 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by sebalix
  • Loading branch information
OCA-git-bot committed Jul 28, 2022
2 parents bb13b69 + afa7b89 commit 159f504
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
5 changes: 0 additions & 5 deletions auth_api_key/i18n/auth_api_key.pot
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ msgstr ""
msgid "API Key"
msgstr ""

#. module: auth_api_key
#: model:ir.model.fields,field_description:auth_api_key.field_auth_api_key__active
msgid "Active"
msgstr ""

#. module: auth_api_key
#: model:ir.model.constraint,message:auth_api_key.constraint_auth_api_key_name_uniq
msgid "Api Key name must be unique."
Expand Down
8 changes: 3 additions & 5 deletions auth_api_key/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ msgstr ""
msgid "API Key"
msgstr "Chiave API"

#. module: auth_api_key
#: model:ir.model.fields,field_description:auth_api_key.field_auth_api_key__active
msgid "Active"
msgstr ""

#. module: auth_api_key
#: model:ir.model.constraint,message:auth_api_key.constraint_auth_api_key_name_uniq
msgid "Api Key name must be unique."
Expand All @@ -49,6 +44,7 @@ msgstr "Creata il"

#. module: auth_api_key
#: model:ir.model.fields,field_description:auth_api_key.field_auth_api_key__display_name
#: model:ir.model.fields,field_description:auth_api_key.field_ir_http__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

Expand All @@ -59,6 +55,7 @@ msgstr "Instradamento HTTP"

#. module: auth_api_key
#: model:ir.model.fields,field_description:auth_api_key.field_auth_api_key__id
#: model:ir.model.fields,field_description:auth_api_key.field_ir_http__id
msgid "ID"
msgstr "ID"

Expand All @@ -69,6 +66,7 @@ msgstr "Chiave"

#. module: auth_api_key
#: model:ir.model.fields,field_description:auth_api_key.field_auth_api_key____last_update
#: model:ir.model.fields,field_description:auth_api_key.field_ir_http____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"

Expand Down
1 change: 0 additions & 1 deletion auth_api_key/models/auth_api_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class AuthApiKey(models.Model):
help="""The user used to process the requests authenticated by
the api key""",
)
active = fields.Boolean(related="user_id.active")

_sql_constraints = [("name_uniq", "unique(name)", "Api Key name must be unique.")]

Expand Down
6 changes: 0 additions & 6 deletions auth_api_key/tests/test_auth_api_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,3 @@ def test_cache_invalidation(self):
)
with self.assertRaises(ValidationError):
self.env["auth.api.key"]._retrieve_uid_from_api_key("api_key")

def test_user_archived(self):
demo_user = self.env.ref("base.user_demo")
demo_user.active = False
with self.assertRaises(ValidationError), self.env.cr.savepoint():
self.env["auth.api.key"]._retrieve_uid_from_api_key("api_key"), demo_user.id

0 comments on commit 159f504

Please sign in to comment.