mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Require init_main_permission question for webapps (#115)
* Require init_main_permission question for webapps * Require init_main_permission question for webapps, fixed Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Factorize a bit init_main_permission warning Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Enhance init_main_permission warning Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> --------- Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
parent
0dd375db34
commit
afdefcc44b
1 changed files with 11 additions and 0 deletions
|
@ -1974,6 +1974,17 @@ 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(main_perm.get('url'), str)
|
||||
and "init_main_permission" not in self.manifest['install']
|
||||
and not main_perm.get('allowed')
|
||||
):
|
||||
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."
|
||||
)
|
||||
|
||||
|
||||
@test()
|
||||
def manifest_schema(self):
|
||||
|
||||
|
|
Loading…
Reference in a new issue