Don't display Security tab in Category?


(Sora &\) #1

My Category don’t display Security tab in Category. This is Category default? How display it? Thank you!

I Use API to setup all category and Subcategory change to group “member”

public function local_edit_permission() {
    $category_url = $this->BASE_URL . '/categories.json?api_key=' . $this->API_KEY . '&api_username=' . $this->API_USERNAME;
    $categories = json_decode($this->getRequest($category_url), true);
    $parent_category_id = [];

    $site_url = $this->BASE_URL . '/site.json?api_key=' . $this->API_KEY . '&api_username=' . $this->API_USERNAME;
    $sites = json_decode($this->getRequest($site_url), true);
    sleep(5);

    foreach($categories['category_list']['categories'] as $category) {
        if(array_key_exists('subcategory_ids', $category)) {
            $parent_category_id[] = $category['id'];
        }
    }

    for($i = 0; $i < count($parent_category_id); $i++) {
        foreach($sites['categories'] as $site) {
            if(array_key_exists('parent_category_id', $site) && $site['parent_category_id'] == $parent_category_id[$i]) {
                $payload = [
                    'name' => $site['name'],
                    'color' => $site['color'],
                    'text_color' => $site['text_color'],
                    'permissions[Member]' => 1,
                    //'group[visibility_level]' => 1
                ];

                $put_url = $this->BASE_URL . '/categories/' . $site['id'] . '?api_key=' . $this->API_KEY . '&api_username=' . $this->API_USERNAME;
                $res = json_decode($this->putRequest($put_url, $payload), true);
                sleep(2);
            }
            else {
                $payload = [
                    'name' => $site['name'],
                    'color' => $site['color'],
                    'text_color' => $site['text_color'],
                    'permissions[Member]' => 1,
                    //'group[visibility_level]' => 1
                ];

                $put_url = $this->BASE_URL . '/categories/' . $site['id'] . '?api_key=' . $this->API_KEY . '&api_username=' . $this->API_USERNAME;
                $res = json_decode($this->putRequest($put_url, $payload), true);
                sleep(2);
            }
        }
    }
    return count($res) > 0 ? 'Success' : 'Call me now';
}

But when finish the default Category don’t display Security tab in this category!

How can we display this tab?
Thank you!


(Jay Pfaffman) #2

Is this for all of the categories you created or Are you trying to repurpose “uncategorized”?


(Sora &\) #3

Yes! “uncategorized” I wanna setup it to “everyone” permission


(Jay Pfaffman) #4

You can’t change uncategorized, which I’m pretty sure has “everyone” permission, but it’s not really a category, but an un-category. I recommend that you disable uncategorized in site settings and create a new category.


(Sora &\) #5


You can see! This category is clock, mean change to other group not everyone :frowning:


(Sora &\) #6

Now, the “uncategorized” Don’t display in menu. How display it again?