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, fixed
Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
parent
15751d3cd2
commit
cf82d0a46b
1 changed files with 10 additions and 9 deletions
|
@ -1942,15 +1942,6 @@ class Manifest(TestSuite):
|
|||
% argument.get("name")
|
||||
)
|
||||
|
||||
elif (
|
||||
argument.get("name") == "domain"
|
||||
and not any([a.get("name") == "init_main_permission" for a in args])
|
||||
):
|
||||
yield Warning(
|
||||
"You should add a 'init_main_permission' question to have the app ready to be accessed right after installation."
|
||||
)
|
||||
|
||||
|
||||
@test()
|
||||
def resource_consistency(self):
|
||||
|
||||
|
@ -1983,6 +1974,16 @@ class Manifest(TestSuite):
|
|||
"When using a postgresql database, you should add postgresql in apt dependencies."
|
||||
)
|
||||
|
||||
if (
|
||||
isinstance(self.manifest["resources"].get('permissions', {}).get('main', {}).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)
|
||||
):
|
||||
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…
Add table
Reference in a new issue