mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
Device.{BBF_VENDOR_PREFIX}URLFilter.Profile.{i}.Name: update permission
This commit is contained in:
parent
7f306cbede
commit
b36eca90a7
3 changed files with 18 additions and 4 deletions
|
|
@ -1296,6 +1296,19 @@ static void uci_set_value(json_object *mapping_obj, int json_version, char *refp
|
|||
char uci_type[32] = {0};
|
||||
|
||||
snprintf(uci_type, sizeof(uci_type), "@%s[%ld]", json_object_get_string(type), instance ? DM_STRTOL(instance)-1 : 0);
|
||||
|
||||
if (strcmp(opt_temp, "@Name") == 0) {
|
||||
struct uci_section *dmmap_section = NULL;
|
||||
char buf[64] = {0};
|
||||
|
||||
snprintf(buf, sizeof(buf), "dmmap_%s", json_object_get_string(file));
|
||||
get_dmmap_section_of_config_section(buf, json_object_get_string(type), section_name((struct uci_section *)data), &dmmap_section);
|
||||
dmuci_set_value_by_section(dmmap_section, "section_name", value);
|
||||
|
||||
dmuci_rename_section(json_object_get_string(file), uci_type, value);
|
||||
return;
|
||||
}
|
||||
|
||||
if (option) {
|
||||
if (linker_jobj)
|
||||
adm_entry_get_linker_value(ctx, value, &linker);
|
||||
|
|
|
|||
|
|
@ -338,6 +338,7 @@ int dmuci_add_list_value(char *package, char *section, char *option, char *value
|
|||
int dmuci_del_list_value(char *package, char *section, char *option, char *value);
|
||||
int dmuci_add_section(char *package, char *stype, struct uci_section **s);
|
||||
int dmuci_delete(char *package, char *section, char *option, char *value);
|
||||
int dmuci_rename_section(char *package, char *section, char *value);
|
||||
int dmuci_get_value_by_section_string(struct uci_section *s, char *option, char **value);
|
||||
char *dmuci_get_value_by_section_fallback_def(struct uci_section *s, char *option, char *default_value);
|
||||
int dmuci_get_value_by_section_list(struct uci_section *s, char *option, struct uci_list **value);
|
||||
|
|
|
|||
|
|
@ -128,14 +128,14 @@
|
|||
"section": {
|
||||
"type": "profile"
|
||||
},
|
||||
"dmmapfile": "dmmap_urlfilter_profile"
|
||||
"dmmapfile": "dmmap_urlfilter"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"write": true,
|
||||
"version": "2.14",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
"section": {
|
||||
"type": "profile"
|
||||
},
|
||||
"list": {
|
||||
"option": {
|
||||
"name": "@Name"
|
||||
}
|
||||
}
|
||||
|
|
@ -258,7 +258,7 @@
|
|||
"section": {
|
||||
"type": "filter"
|
||||
},
|
||||
"dmmapfile": "dmmap_urlfilter_filter"
|
||||
"dmmapfile": "dmmap_urlfilter"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue