-
Notifications
You must be signed in to change notification settings - Fork 116
Customizing who can view and manage Stream
Stream has two access capabilities, viewing Stream and managing Stream. These capabilities are defined in the Stream codebase here.
###Viewing Stream
Viewing records requires the view_stream
capability to be assigned to a role.
Assigning a capability to a user role can be done on the Stream Settings screen in the WP Admin under Role Access. Every role that is selected here is given the view_stream
capability.
Alternatively, you can assign capabilities to user roles programmatically using the add_cap()
function in WordPress core.
###Managing Stream
Stream Settings on the other hand can be changed by any role that has been granted the manage_options
capability. This is a high-level generic capability that is built into WordPress core and reserved for Administrators to be able to change settings. It is used most commonly by other plugins for the same purpose.
Note: If you can manage Stream, it also means you can view Stream.
If you would like certain roles to not be able to change Stream Settings, then the manage_options
capability should be removed from their role. In general, it is best practice not to block Administrators from anything. This is why Stream is manageable by Administrators by default.