Giter Club home page Giter Club logo

categories-ntnx's Introduction

Mask Category Permissions

Introduction

Nutanix does not have RBAC on Categories (at the time of this post). That means project users are able to see all Categories. While this is a FEAT in progress, this script is a workaround to mask the categories view.

Installation

It is strongly recommended to run this script within a virtual environment and install all of the required dependencies there.

Run in Terminal/Command Prompt:

git clone https://github.com/nkunnath/categories-ntnx.git
cd categories-ntnx/
python -m pip install virtualenv
python -m virtualenv venv

In UNIX system:

source venv/bin/activate

In Windows:

venv\Scripts\activate

To install the required packages to this environment, simply run:

pip install -r requirements.txt

Usage

The script connects to a Prism Central instance and masks the permissions required to view Categories.

Run the below from command line.

python categories.py -h

usage: 
    There are 3 choices to run the script.
    python categories.py --list_all_roles
    python categories.py --list_roles_with_cat_perm
    python categories.py --delete_cat_permissions <ROLE_UUID>
    

Script to remove category permissions

optional arguments:
  -h, --help            show this help message and exit
  --list_all_roles      List all the roles in the PC
  --list_roles_with_cat_perm
                        List all the roles in the PC which have category permissions
  --delete_cat_permissions DELETE_CAT_PERMISSIONS
                        Delete the view category permissions for one role

Look at the screenshots.md for an example.

License

MIT

categories-ntnx's People

Contributors

nkunnath avatar

Stargazers

Alex Theodore avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.