Skip to content

Commit

Permalink
feat(middlewared/system): implement system.general.ui_certificate_cho…
Browse files Browse the repository at this point in the history
…ices

Ticket:	#76594
  • Loading branch information
william-gr committed Feb 22, 2019
1 parent 70b9f4e commit cc23033
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/middlewared/middlewared/plugins/system.py
Expand Up @@ -820,6 +820,18 @@ async def validate_general_settings(self, data, schema):

return verrors

@accepts()
async def ui_certificate_choices(self):
"""
Return choices of `ui_certificate` attribute for `system.general.update`.
"""
return {
i['id']: i['name']
for i in await self.middleware.call('certificate.query', [
('cert_type_CSR', '=', False)
])
}

@accepts(
Dict(
'general_settings',
Expand Down

0 comments on commit cc23033

Please sign in to comment.