Matching fields on user and author profile.

Created on 4 February 2015, about 10 years ago
Updated 25 April 2025, 1 day ago

For our use case we had the requirement to allow the editing of nodes base on whether the viewer and the author were from the same company. The company is a reference field on the user profile type.

I added an "Author" section to the admin screen, similar to the existing settings, for the new functionality. When called, the new functionality checks the field in both author and viewer profiles and ensures that there is at lease one match before allowing access.

I have check with both standard ('value') fields and reference ('target_id') fields and works with both.

Also, the profiles were originally created with Profile 2 β†’ , so the functionality checks both the standard profile and, if enabled, profile 2 profiles.

✨ Feature request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom John Cook

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024