Powerful side-by-side comparison tool for Salesforce Permission Sets
Permission Set Comparator is a Lightning Web Component-based application that enables Salesforce administrators to compare permission sets side-by-side, identify differences, and manage security configurations with confidence.
- Features
- Installation
- Quick Start
- Usage Guide
- Screenshots
- Technical Architecture
- Development
- Contributing
- Roadmap
- Support
- License
Core Comparison Capabilities
- Side-by-Side Comparison: Compare two permission sets in a clean, intuitive interface
- Comprehensive Permission Analysis: Compare across all permission types:
- Object Permissions (Create, Read, Update, Delete, View All, Modify All)
- Field-Level Security (Read, Edit permissions)
- System Permissions (API Enabled, View All Data, Modify All Data, etc.)
- Apex Class Access
- Visualforce Page Access
- Tab Settings
- Visual Difference Indicators: Color-coded highlighting shows added, removed, and changed permissions
- Smart Search: Quickly find permission sets with searchable selectors
- Summary Statistics: At-a-glance view of total differences by category
- Flexible Viewing: Toggle between tabbed and accordion views
- Quick Swap: Instantly swap which permission set is on the left vs. right
See Roadmap for detailed feature planning including:
- Multi-permission set comparison (v1.1)
- Export to CSV/Excel/PDF (v1.1)
- Bulk permission modifications (v1.2)
- AI-powered permission suggestions (v2.0)
- Multi-org comparison (v2.1)
- Salesforce org (Production, Developer, or Sandbox)
- System Administrator or equivalent permissions
- API access enabled
You can install the application directly into your Salesforce environment (Sandbox recommended for testing) using the link below:
*Install Permission Set Comparator (v0.1.0) **
- Log in to your Salesforce org.
- Click the link above.
- Select "Install for All Users".
- Click "Install".
-
Clone the repository:
git clone https://github.com/your-org/ps-comparator.git cd ps-comparator -
Authenticate to your org:
sf org login web -a YourOrgAlias
-
Deploy the source:
sf project deploy start -o YourOrgAlias
-
Assign the Permission Set:
sf org assign permset -n PSC_Admin -o YourOrgAlias
- Navigate to the App Launcher in Salesforce
- Search for "Permission Set Comparator"
- Click to open the application
-
Select Permission Sets:
- Use the left dropdown to select your first permission set
- Use the right dropdown to select a second permission set
-
Click "Compare":
- The system will analyze both permission sets
- Results appear in seconds
-
Review Differences:
- Browse through tabs: Objects, Fields, System, Apex, VF Pages, Tabs
- Numbers in parentheses show difference counts per category
- Color coding:
- Green: Permission added in PS2
- Red: Permission removed in PS2
- Yellow: Permission exists but differs between sets
-
Use Quick Actions:
- Swap: Switch which permission set is on left/right
- Reset: Clear selections and start over
- Permission Set 1 (Left): Select the baseline permission set
- Permission Set 2 (Right): Select the permission set to compare against
- Swap Button: Reverse the two permission sets
- Compare Button: Execute the comparison
- Reset Button: Clear all selections and results
Summary Card displays:
- Total number of differences found
- Breakdown by permission type
- Comparison timestamp
Comparison Tabs:
- Objects: CRUD and View/Modify All permissions for standard and custom objects
- Fields: Field-level security for all fields across objects
- System: Administrative and system-level permissions
- Apex: Apex class access permissions
- VF Pages: Visualforce page access permissions
- Tabs: Tab visibility settings
Each permission difference shows:
- Permission Name: The specific permission being compared
- Value in PS1: Enabled (✓) or Disabled (✗) in the first permission set
- Value in PS2: Enabled (✓) or Disabled (✗) in the second permission set
- Difference Type:
- ADDED: Permission is enabled in PS2 but not in PS1
- REMOVED: Permission is enabled in PS1 but not in PS2
- SAME: Permission has identical values in both sets
- Start with Object Permissions: Review object-level access before diving into fields
- Check System Permissions: These often have the highest security impact
- Document Your Findings: Take screenshots or notes of important differences
- Compare Regularly: Run comparisons when creating new permission sets or troubleshooting access issues
- Use Meaningful Names: Ensure permission sets have clear, descriptive labels
Compare your new permission set against a similar existing one to ensure you haven't missed permissions.
Compare a working user's permission set against a non-working user's to identify missing permissions.
Compare permission sets before and after changes to track security modifications.
Identify overlapping permissions when combining or streamlining permission sets.
Use comparisons to document permission requirements for different roles.
Screenshots will be added here showing:
- Main comparison interface
- Permission selection dropdowns
- Detailed difference view
- Summary statistics panel
- Different permission categories (Objects, Fields, System, etc.)
- Platform: Salesforce Lightning Experience
- Frontend: Lightning Web Components (LWC)
- Backend: Apex (API Version 65.0)
- Package Type: 2GP (Second-Generation Managed Package)
- Namespace:
sspc
| Class | Purpose |
|---|---|
PSC_ComparisonController |
AuraEnabled controller exposing methods to LWC |
PSC_PermissionSetService |
Business logic for permission set comparisons |
PSC_PermissionSetSelector |
SOQL queries for permission data retrieval |
PSC_ComparisonResult |
Wrapper class for comparison results |
PSC_PermissionDiff |
Represents individual permission differences |
PSC_ComparisonException |
Custom exception handling |
PSC_TestDataFactory |
Test data factory for unit tests |
| Component | Purpose |
|---|---|
permissionSetComparator |
Main container component |
permissionSetSelector |
Searchable permission set picker |
comparisonSummary |
Statistics and summary display |
comparisonTable |
Generic table for permission differences |
groupedFieldTable |
Specialized table for field permissions by object |
diffIndicator |
Visual indicator for difference types |
The application uses standard Salesforce objects:
PermissionSetObjectPermissionsFieldPermissionsSetupEntityAccessPermissionSetTabSettingApexClassApexPage
- All Apex classes use
with sharingfor row-level security - CRUD/FLS enforced via standard platform security
- No hardcoded credentials or IDs
- AppExchange security review compliant
- Salesforce CLI (
sf) - Node.js 18+ (for LWC development)
- VS Code with Salesforce Extension Pack
- Git
- Dev Hub enabled org
# Clone repository
git clone https://github.com/your-org/ps-comparator.git
cd ps-comparator
# Install Node dependencies
npm install
# Authenticate Dev Hub
sf org login web -d -a DevHub
# Create scratch org
sf org create scratch -f config/project-scratch-def.json -a PSC_Dev -d 30
# Push source to scratch org
sf project deploy start -o PSC_Dev
# Assign permission set
sf org assign permset -n PSC_Admin -o PSC_Dev
# Open org
sf org open -o PSC_Dev# Run all tests with coverage
sf apex run test --code-coverage --result-format human -o PSC_Dev
# Run specific test class
sf apex run test --class-names PSC_PermissionSetServiceTest -o PSC_Dev# Run all Jest tests
npm run test:unit
# Run tests in watch mode
npm run test:unit:watch
# Run tests with coverage
npm run test:unit:coverage# Run ESLint
npm run lint
# Auto-fix ESLint issues
npm run lint:fixThis project follows strict coding standards. Key guidelines include:
- Apex: ApexDoc comments, max 40 lines per method, 90%+ test coverage
- LWC: Component-focused architecture, Jest tests for all components
- Naming:
PSC_prefix for all Apex classes,pscprefix for CSS - Security: AppExchange security review compliance mandatory
We welcome contributions! Here's how you can help:
- Use GitHub Issues to report bugs
- Include steps to reproduce
- Provide Salesforce org edition and API version
- Include error messages and screenshots
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Follow coding standards (see Coding Standards section)
- Write tests (maintain 90%+ coverage)
- Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- All tests passing
- Code coverage above 90%
- Follows established patterns and standards
- Security best practices followed
- ApexDoc/JSDoc comments present
- No hardcoded IDs or credentials
See permission-set-comparator-roadmap.md for the complete product roadmap.
- v1.1 (Precision): Multi-permission set comparison, export to CSV/Excel/PDF
- v1.2 (Action): Bulk permission modifications, permission set creation
- v2.0 (Intelligence): AI-powered permission suggestions and security scoring
- v2.1 (Enterprise): Multi-org comparison, team collaboration features
We are actively developing this tool and we need your feedback!
Our goal is to build the best permission management tool for Salesforce Admins and Developers. We are committed to supporting and improving this application based on your input.
- Feature Requests: Have an idea? Open an Issue with the " enhancement" label.
- Bug Reports: Found something broken? Report a Bug so we can fix it.
- General Questions: Start a discussion in our GitHub Discussions tab.
- Documentation: See this README for technical details.
This project is commercial software intended for distribution on the Salesforce AppExchange.
Copyright © 2025 [Your Company Name]
For licensing inquiries, contact: licensing@yourcompany.com
- Built with Salesforce Lightning Web Components
- Follows Salesforce UX/UI best practices using SLDS
- Inspired by the need for better permission management in Salesforce
- Product Name: Permission Set Comparator
- Version: 1.0.0 (MVP)
- Namespace:
sspc - Salesforce API: v65.0
- Status: In Development
- Target Platform: Salesforce Lightning Experience
Last Updated: January 2025