Day 025 / Frappe / Permission Review

Role Matrix

View source ↗Scroll to explore ↓
Role Matrix project cover
/ Overview

A dependency-free Python CLI that turns sanitized Frappe permission rows into a role-by-action matrix without connecting to a site or inspecting users.

NameRole Matrix

ClientIndependent daily build

IndustriesDeveloper and operations tooling

DateDay 025 · September 24, 2026

/ Challenge

Frappe permission rows can span several DocTypes and permission levels. Raw JSON makes it difficult to see the effective action set for each role or notice repeated keys during a review.

/ Provided services

Clear thinking.
Practical delivery.

01

Permission summary

Combines allowlisted document actions into a deterministic matrix for every supplied DocType and role.

02

Review findings

Identifies identical and conflicting rows with the same DocType, role and permission level without deciding policy on the administrator's behalf.

03

Privacy-conscious input

Discards unrecognized properties and never requests user records, credentials or live site access.

Role Matrix feature visual
/ Solution

Role Matrix validates a supplied JSON array, aggregates standard document actions by DocType and role, preserves the contributing permission levels, and reports identical or conflicting rows that share the same key.

/ Impact

Role-by-action matrix

Permission-level aggregation

Duplicate and conflict detection

Unknown properties discarded

No site connection or permission mutation

Eleven passing standard-library tests

/ Tech stack

Python standard library

Argparse, pathlib, JSON and collection helpers provide the complete dependency-free command-line workflow.

Frappe permission concepts

Models roles, DocTypes, permission levels and ten standard document actions from sanitized rows.

Unittest

Eleven tests cover validation, aggregation, duplicate and conflict detection, privacy boundaries and exit behavior.

Next project

DocType Field Diff

View case study ↗