-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write an isAuthor method? #54
Comments
I think just a If it was part of a broader Util full of handy tolls for out-of-HTTPRequest context, then it would be a different story. (If im in the context of a HTTP Request I (almost) always want to use WCMMode rather than runmodes.) |
I could see this being useful if it was a static. That requires jumping through some hoops to get this value set in a static context. Probably an immediate component which sets the values on startup. Runmodes can't be changed at runtime, so this is OK to do once. If so, I'd like to see
|
@davidjgonzalez I thought WCMMode was never a good way to differentiate between being on author or publish. IIRC @justinedelson is a proponent of this. @justinedelson are you talking about creating a OSGi component that sets the values on startup? I would love to do this, but, might (read will) need direction to get me started. |
@kaushalmall WCMModes don't differentiate between author and publish instances; but can differentiate between intended publish and author behaviors. Within HTTP Request scoped-behaviors (Components/Servlets/etc.) the idea of the author/publish runmode is (normally) just an abstraction around WCMMode types. Creating hard in-code deps on Author or Publish make it more difficult to experience the behavior on Author as it would on Publish. Runmodes typically play a role in changing backend behaviors (WF, Listeners, Jobs, etc.) that need to behave differently based on the tier. Of course, as with anything there are exceptions. IIRC @jayk is a proponent of WCMModes :P |
Does it help to write a utils method to get check the sling runmode and return an isAuthor boolean? I can do it, but, need to know from you guys if I should create a new SlingUtils class or add this to an existing class.
Let me know what you thinks.
Thanjs
The text was updated successfully, but these errors were encountered: