rpcd: use "access-group" meta scope when checking menu permissions
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 11 Sep 2013 11:39:02 +0000 (13:39 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 11 Sep 2013 11:39:02 +0000 (13:39 +0200)
luci2/src/rpcd/luci2.c

index f136c56eaf87e7f5cfa62dec47bfe4f15fedf606..2b1a7501c438d5a5538c39626956ff06f1dafdbf 100644 (file)
@@ -1998,7 +1998,7 @@ menu_access(struct blob_attr *sid, struct blob_attr *acls, struct blob_buf *e)
 
        blobmsg_for_each_attr(acl, acls, rem)
        {
-               if (!ops->session_access(blobmsg_data(sid), "luci-ui",
+               if (!ops->session_access(blobmsg_data(sid), "access-group",
                                         blobmsg_data(acl), "read"))
                {
                        rv = false;
@@ -2006,7 +2006,7 @@ menu_access(struct blob_attr *sid, struct blob_attr *acls, struct blob_buf *e)
                }
 
                blobmsg_add_u8(e, blobmsg_data(acl),
-                              ops->session_access(blobmsg_data(sid), "luci-ui",
+                              ops->session_access(blobmsg_data(sid), "access-group",
                                                   blobmsg_data(acl), "write"));
        }