Report setting_set of is_public in upgrade script as an error ... the only apps still doing this have pending changes in testing to fix it

This commit is contained in:
Alexandre Aubin 2022-08-16 23:32:48 +02:00
parent 45f267a4ad
commit c2f55552d6

View file

@ -2120,6 +2120,11 @@ class Script(TestSuite):
@test() @test()
def set_is_public_setting(self): def set_is_public_setting(self):
if self.containsregex(r"ynh_app_setting_set .*is_public.*"): if self.containsregex(r"ynh_app_setting_set .*is_public.*"):
if self.name == "upgrade":
yield Error(
"permission system: it should not be needed to save is_public with ynh_app_setting_set ... this setting should only be used during installation to initialize the permission. The admin is likely to manually tweak the permission using YunoHost's interface later."
)
else:
yield Warning( yield Warning(
"permission system: it should not be needed to save is_public with ynh_app_setting_set ... this setting should only be used during installation to initialize the permission. The admin is likely to manually tweak the permission using YunoHost's interface later." "permission system: it should not be needed to save is_public with ynh_app_setting_set ... this setting should only be used during installation to initialize the permission. The admin is likely to manually tweak the permission using YunoHost's interface later."
) )