• service permission manager

    Returns PermissionManager

    Example

    import * as permission from 'permission';

    let mng = permission.newPermissionManager();

    let ps = mng.getList();
    ps.forEach((v) => console.log(v.name));
    ps.forEach((v) => console.log(v));

    let categories = mng.getCategoryList();
    categories.forEach((v) => {
    console.log("category: ", v);
    let cp = mng.getListByCategory(v);
    cp.forEach((d) => console.log(d));
    })

    console.log("no categories");
    let cp = mng.getListByCategory("");
    cp.forEach((d) => console.log(d.name))


    let id = mng.create("name_2", "新建的标签", "test");
    console.log(id);

    cp = mng.getListByCategory("test")
    cp.forEach((v) => console.log(v.id, v.name, v.label, v.category));

    mng.delete(id);