diff --git a/package_linter.py b/package_linter.py index d2b7810..7daed73 100755 --- a/package_linter.py +++ b/package_linter.py @@ -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):