1. 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

Discussion in 'Resolved Bug Reports' started by Xon, Jun 21, 2016.

  1. Xon

    Xon Well-Known Member

    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: Jun 21, 2016
    semprot likes this.
  2. Mike

    Mike XenForo Developer Staff Member

    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.
    Alfa1 and Xon like this.

Share This Page