Edit.tpl and users permissions

Author Message

laurent le cadet

Thursday 16 August 2007 6:42:50 am

Hi,

I can manage to use roles while editing an object (front office) :

...
        <div class="buttonblock">
            <input class="defaultbutton" type="submit" name="PublishButton" value="{'Store'|i18n('design/base')}" />
            <input class="button" type="submit" name="DiscardButton" value="{'Cancel'|i18n('design/base')}" />
			{if $current_user.is_logged_in}
			<input type="hidden" name="RedirectURI" value="/" />
			{else}
            <input type="hidden" name="RedirectURI" value="/content/view/full/146" />
			<input type="hidden" name="FutureNodeHiddenState_{$main_node_id}" value="hidden" />
			{/if}
            <input type="hidden" name="DiscardConfirm" value="0" />
        </div>
        </form>
...

I tryed almost {if}everything{/if} but no result.

Any idea?

Regards.

Laurent

laurent le cadet

Thursday 16 August 2007 7:45:53 am

Auto response :

I need to fetch again in the edition template itself :


<div class="buttonblock">
            <input class="defaultbutton" type="submit" name="PublishButton" value="{'Store'|i18n('design/base')}" />
            <input class="button" type="submit" name="DiscardButton" value="{'Cancel'|i18n('design/base')}" />
			{let user=fetch('user','current_user')}
			{if $user.is_logged_in|not()}
            <input type="hidden" name="RedirectURI" value="/content/view/full/146" />
			<input type="hidden" name="FutureNodeHiddenState_{$main_node_id}" value="hidden" />
			{/if}
			{/let}
            <input type="hidden" name="DiscardConfirm" value="0" />
        </div>
        </form>

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.