mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Factorize a bit init_main_permission warning
Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
parent
cf82d0a46b
commit
eb518e84e7
1 changed files with 3 additions and 2 deletions
|
@ -1974,10 +1974,11 @@ class Manifest(TestSuite):
|
|||
"When using a postgresql database, you should add postgresql in apt dependencies."
|
||||
)
|
||||
|
||||
main_perm = self.manifest["resources"].get('permissions', {}).get('main', {})
|
||||
if (
|
||||
isinstance(self.manifest["resources"].get('permissions', {}).get('main', {}).get('url'), str)
|
||||
isinstance(main_perm.get('url'), str)
|
||||
and "init_main_permission" not in self.manifest['install']
|
||||
and not isinstance(self.manifest["resources"].get('permissions', {}).get('main', {}).get('allowed'), str)
|
||||
and not isinstance(main_perm.get('allowed'), str)
|
||||
):
|
||||
yield Warning(
|
||||
"You should add a 'init_main_permission' question, or define `allowed` for main permission to have the app ready to be accessed right after installation."
|
||||
|
|
Loading…
Add table
Reference in a new issue