Skip to content

Instantly share code, notes, and snippets.

@philipstears
Created March 7, 2014 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philipstears/6a70ca0079e3896d2044 to your computer and use it in GitHub Desktop.
Save philipstears/6a70ca0079e3896d2044 to your computer and use it in GitHub Desktop.
Imports DriveWorks.Specification
<Condition("Is Not Owner", Nothing)>
Public Class IsNotOwner
Inherits Condition
Protected Overrides Function Evaluate(ByVal specificationContext As SpecificationContext) As Boolean
Dim currentUser = specificationContext.Group.CurrentUser.Id
Dim creator = specificationContext.Group.Specifications.GetSpecification(specificationContext.Id).CreatorId
Return currentUser <> creator
End Function
End Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment