RoleGuard — Temporary Role Manager

ማብራሪያ

RoleGuard lets you assign time-limited roles to any WordPress user. When the clock runs out, the user is automatically reverted to their original role. No more forgotten elevated permissions, no more security risks from stale access.

Who is this for?

  • Agencies managing freelance contractors who need temporary editor access
  • Multi-author blogs bringing in guest contributors for a limited run
  • Membership sites offering trial access to premium content
  • Client sites where clients need temporary admin for review and approval
  • LMS platforms with time-limited instructor or teaching assistant roles
  • eCommerce stores granting seasonal staff temporary shop manager access

How it works

  1. Go to any user’s profile page
  2. Select a temporary role and expiration (quick presets: 7, 14, 30, or 90 days)
  3. RoleGuard stores the original role, applies the new one, and starts the countdown
  4. When time expires, the user’s role is automatically reverted to what it was before

Free Features

  • Assign temporary roles with date-based expiration
  • Quick presets: 7, 14, 30, or 90 days — or set any custom date
  • Automatic role reversion via WP-Cron (hourly checks)
  • Admin safety net: checks on admin page loads if cron hasn’t run in 2+ hours
  • Email notifications to both users and admins on role expiry
  • Advance warning emails (configurable: 1–30 days before expiry)
  • “Temp Role” and “Expires” columns in the Users list (sortable, color-coded)
  • Dedicated RoleGuard section on every Edit User profile screen
  • Bulk action: revoke temporary roles for multiple users at once
  • Privilege escalation prevention — cannot assign roles at or above your own level
  • Up to 10 active temporary role assignments
  • Settings page with active assignments dashboard
  • Fully translatable with proper text domain

What makes RoleGuard different?

  • Zero configuration — activate and start assigning, no setup wizard
  • Security first — privilege escalation prevention built in from day one
  • Reliable expiration — hourly cron + admin safety net means roles never get stuck
  • Clean reversion — stores the exact original role, not just a fallback default
  • Lightweight — no JavaScript frameworks, no external API calls, no bloat

RoleGuard Pro

Need more? RoleGuard Pro is a separate add-on that unlocks:

  • Unlimited temporary role assignments (removes the 10-user limit)
  • Full audit log with filtering, pagination, and export
  • Bulk assignment page with CSV import
  • Scheduled roles with future start dates
  • Slack and Zapier webhook notifications
  • Extended REST API for external integrations
  • WordPress dashboard widget showing upcoming expirations
  • License-gated — one clean upgrade, no feature nags

Screenshots

  • User profile page — assign a temporary role with quick presets or custom date
  • Users list — sortable “Temp Role” and “Expires” columns with color-coded urgency
  • Settings page — active assignments dashboard, notification toggles, cron status

መጫን

From WordPress Dashboard

  1. Navigate to Plugins Add New
  2. Search for RoleGuard
  3. Click Install Now, then Activate
  4. Go to any user’s Edit Profile page to assign a temporary role
  5. Configure notifications at Settings RoleGuard

Manual Installation

  1. Download the plugin ZIP file
  2. Upload the roleguard folder to /wp-content/plugins/
  3. Activate through the Plugins menu in WordPress
  4. Visit Settings RoleGuard to configure

የተለመዱ ጥያቄዎች

What happens when a temporary role expires?

The user is automatically reverted to the exact role they held before the temporary assignment. RoleGuard stores the original role in user meta and restores it when the expiration time passes.

How often does RoleGuard check for expired roles?

Every hour via WordPress built-in WP-Cron. As a safety net, RoleGuard also checks whenever any admin visits an admin page — but only if the cron hasn’t run in the last 2 hours. This dual approach ensures roles never stay active past their expiration.

Can I extend a temporary role?

Yes. Visit the user’s Edit Profile page and enter a new expiration date in the “Extend Until” field. The expiration is updated immediately without disrupting the user’s current access.

Can I revoke a temporary role early?

Yes, two ways: (1) Check the “Revoke temporary role now” box on the user’s profile, or (2) Select multiple users in the Users list and use the “Revoke Temporary Role” bulk action.

What happens if I deactivate the plugin?

The cron schedule is cleared on deactivation, but user meta is preserved. If you reactivate later, existing temporary roles will resume normal expiration checks. Users who should have expired during the inactive period will be reverted on the next check.

What’s the free version limit?

10 active temporary role assignments at a time. This covers the vast majority of small-to-medium sites. If you need more, RoleGuard Pro removes this limit entirely.

Can users escalate their own privileges?

No. RoleGuard enforces a strict role hierarchy. A user can only assign temporary roles that are lower than their own role level. Only users with the WordPress promote_users capability can assign temporary roles at all.

Does it work with custom roles?

Yes. RoleGuard reads all registered WordPress roles and displays them in the role assignment dropdown. Custom roles created by other plugins (like Members or User Role Editor) are fully supported.

Does it work with Multisite?

The free version works on individual sites within a Multisite network. Network-wide role management is planned for a future Pro release.

Is the plugin translatable?

Yes. All strings use the roleguard text domain and are properly wrapped with WordPress i18n functions. Translation-ready out of the box.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“RoleGuard — Temporary Role Manager” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

  • Initial release
  • Temporary role assignment with date-based expiration
  • Auto-revert via WP-Cron with admin safety net
  • Quick presets: 7, 14, 30, 90 days + custom date picker
  • Email notifications to users and admins on role expiry
  • Advance warning emails with configurable lead time
  • “Temp Role” and “Expires” columns in Users list (sortable, color-coded)
  • Bulk revoke action in Users list
  • Settings page with active assignments dashboard
  • Privilege escalation prevention
  • 10 active temporary role assignments (free tier)