mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
appsv2: also replace __DOMAIN__ in resource properties
This commit is contained in:
parent
e24ddd299e
commit
0c4a006a4f
1 changed files with 3 additions and 0 deletions
|
@ -152,6 +152,9 @@ class AppResource:
|
||||||
for key, value in properties.items():
|
for key, value in properties.items():
|
||||||
if isinstance(value, str):
|
if isinstance(value, str):
|
||||||
value = value.replace("__APP__", self.app)
|
value = value.replace("__APP__", self.app)
|
||||||
|
# This one is needed for custom permission urls where the domain might be used
|
||||||
|
if "__DOMAIN__" in value:
|
||||||
|
value.replace("__DOMAIN__", self.get_setting("domain"))
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
|
|
||||||
def get_setting(self, key):
|
def get_setting(self, key):
|
||||||
|
|
Loading…
Add table
Reference in a new issue