You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-panel/share/templates/api/platforminfo.tt

26 lines
607 B

[%-
json = '';
IF !c.user_exists;
IF c.stash.ngcp_api_realm == "subscriber";
json_file = "/etc/ngcp-defaults/csc_defaults_public.json";
ELSE;
json_file = "/etc/ngcp-defaults/admin_defaults_public.json";
END;
ELSE;
IF c.user.roles == 'subscriber' || c.user.roles == 'subscriberadmin';
json_file = "/etc/ngcp-defaults/csc_defaults_private.json";
ELSE;
json_file = "/etc/ngcp-defaults/admin_defaults_private.json";
END;
END;
TRY;
INCLUDE $json_file;
CATCH;
json = '{"error": "an internal error when fetching the config data"}';
END;
json;
-%]