• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Design issue XenForo_ContentPermission_Interface design issue

Xon

Well-known member
#1
This interface XenForo_ContentPermission_Interface, appears to be rather incomplete.

It has a single method, but every implementation needs to implement similar functions to the existing node implementation.

For example, getContentPermissionDetails is assumed to exist on an XenForo_ContentPermission_Interface instance in the permission analysis code.

Additionally in XenForo_ControllerAdmin_Permission::_getPermissionAnalysisTypeData, this method looks up the permission content handler, and then generates some analysis info. This is the sort of thing which should be pushed into the XenForo_ContentPermission_Interface if possible.

Perhaps the XenForo_ContentPermission_Interface should also participate when actionAnalyze() needs to gather requirements for selecting the content id?

:edit: This may belong under suggestions to be honest.
 
Last edited:

Mike

XenForo developer
Staff member
#2
I'm going to call this a design issue as we can't change the interface at this point.

In the future, it's a moot point since the permission generation code/classes are very different in XF2, so this naturally won't be relevant.