• Stars
    star
    151
  • Rank 246,057 (Top 5 %)
  • Language
    Python
  • License
    BSD 2-Clause "Sim...
  • Created over 8 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Reusable application which provides a view permission for the existing models.

Admin View Permission

Build Status Coverage Status Code Climate

Reusable application which provides a view permission for the existing models.

Requirements

  • Django

Support

The package is deprecated for Django 2.1. Django added the functionality into the core ( the 2 implementations are different). You should use this package only if you use Django < 2.1.

  • If you have installed this package by accident to your Django 2.1 project, it won't affect the build-in view permission which comes with Django.
  • If you have upgraded you application to use Django > 2.1 just uninstall this package
  • Django: 1.8, 1.9, 1.10, 1.11, 2.0
  • Python: 2.7, 3.4, 3.5, 3.6

Compatible with django-parler's translatable models. To verify which django-parler version our test suite runs against, check requirements-debug.txt. You do not need django-parler to install django-admin-view-permission.

Documentation

For a full documentation you can visit: http://django-admin-view-permission.readthedocs.org/

Setup

  • pip install django-admin-view-permission

and then add admin_view_permission at the INSTALLED_APPS like this:

INSTALLED_APPS = [
    'admin_view_permission',
    'django.contrib.admin',
    ...
]

and finally run python manage.py migrate.

You need to place the admin_view_permission before django.contrib.admin in INSTALLED_APPS.

In case of a customized AdminSite in order to apply the view permission, you should inherit from the AdminViewPermissionAdminSite class:

from admin_view_permission.admin import AdminViewPermissionAdminSite

class MyAdminSite(AdminViewPermissionAdminSite):
    ...

Configuration

This app provides a setting:

ADMIN_VIEW_PERMISSION_MODELS = [
    'auth.User',
    ...
]

in which you can provide which models you want to be added the view permission. If you don't specify this setting then the view permission will be applied to all the models.

Uninstall

  1. Remove the admin_view_permission from your INSTALLED_APPS setting

  2. Delete the view permissions from the database:

    from django.contrib.auth.models import Permission
    permissions = Permission.objects.filter(codename__startswith='view')
    permissions.delete()
    

    It will be helpful to check if the queryset contains only the view permissions and not anything else (for example: custom permission added)

More Repositories

1

CAPE

Malware Configuration And Payload Extraction
Python
747
star
2

crackerjack

CrackerJack / Hashcat Web Interface / Context Information Security
Python
357
star
3

SnitchDNS

Database Driven DNS Server with a Web UI
Python
236
star
4

beemka

Basic Electron Exploitation
Python
201
star
5

RDP-Replay

Replay RDP traffic from PCAP
C
183
star
6

canape

CANAPE Network Testing Tool
Python
183
star
7

DLLHSC

DLLHSC - DLL Hijack SCanner a tool to assist with the discovery of suitable candidates for DLL Hijacking
C++
138
star
8

DynamicLabs

Dynamic Labs is an open source tool aimed at red teamers and pentesters for the quick deployment of flexible, transient and cloud-hosted lab environments.
HCL
60
star
9

django-admin-multiple-choice-list-filter

Python
59
star
10

DynamicWrapperEx

x64 Registration-Free In-Process COM Automation Server.
C++
46
star
11

Furby

Python tools for handing Furby Connect DLC files
Python
43
star
12

capemon

CAPE monitor DLLs
C
38
star
13

cbrcli

Command line interface to Carbon Black Response
Python
38
star
14

cvsslib

A library implementing CVSS v2 and v3 scores
Python
31
star
15

pac-leak-demo

PAC HTTPS leak demo from DEF CON 24 'Toxic Proxies' talk
JavaScript
29
star
16

yate-bts

Yate BTS
C
20
star
17

VulnerableXsltConsoleApplication

Vulnerable XSLT Console Application
10
star
18

OpenBanking-BurpExtension

Java
7
star
19

stun-remote-control

Control Motorola/Binatone IP cameras behind NAT
Python
5
star
20

django-inline-admin-extensions

Add pagination to Django inline admin
Python
4
star
21

OpenBanking-MessageSigning

Java
3
star
22

RFTap

Modified RFTap dissector for Wireshark
C
3
star
23

OpenBanking-AuthorisationRedirect

Java
2
star
24

mid-level-interview

Python
1
star
25

blog

Archived posts from www.contextis.com
HTML
1
star
26

webdev-demo

An example of a typical web dev environment built with Docker, Django, Nginx, Redis, and more.
Python
1
star