The view of non-viewable field only really crops up with table and
table-plus tags.  Regular view tags (which are what are used in a
default show-page), check for permissions before displaying.  For some
reason, tables don't check each column for viewable before trying to
display.

On Nov 11, 10:27 am, Peter Ehrlich <[email protected]> wrote:
> Yeah the permissions would give me "view of non-viewable field" error,
> and there are additions to be made (lifecycle buttons, etc) as well.
>
> Although what you mention would work, its basically what I already do
> - have conditions scattered throughout wordy and slightly annoying
> tags throughout the page.
>
> This is very much a side note, but it would be cool if:
>  - there was one tag for <extend whatever><old whatever merge>.  We do
> this all the time!  There's no need to make two tags AND specify the
> tag name twice.. (extend tag="mytag" <old-mytag>)
>  - You could merge in parameter and non parameter tags - it should
> just wrap the parameters as closely as possible. It would be
> intuitive.  If this was too much there could even just be a special
> case for conditions, so you can decide whether or not to put the
> parameter tags in.
>
> Ok. [/rant]
>
> Cheers,
> --Peter "haml-fan" Ehrlich
>
> On Nov 11, 12:10 pm, kevinpfromnm <[email protected]> wrote:
>
> > Limiting view permissions for certain fields to administrators doesn't
> > get you most of what you need?
>
> > Your sample code won't work because you can't mix parameter and non-
> > parameter tags (dryml wouldn't know where to put the non-parameter
> > tags).
>
> > <old-show-page merge>
> >   <prepend-content-body:>
> >     <div if="&current_user.administrator?">
> >        ...
> >     </div>
> >   </prepend-content-body:>
> >   <append-content:>
> >      ...
>
> > Might work for what you're wanting.  Note, you can't use prepend and
> > append on the same parameter (hence switching to prepending on content-
> > body).  To do that, you should replace and restore the parameter
> > within your added content.
>
> > On Nov 11, 9:46 am, Peter Ehrlich <[email protected]> wrote:
>
> > > So I have this page, with a bunch of stuff on it.  This page has more
> > > stuff on it if an admin views it, and some of the stuff is modified.
>
> > > (Don't just immediately say admin subsite...)
>
> > > The way I'm currently doing this is by having a bunch of conditions
> > > riddled throughout the page.  The way I would like to do it, is to
> > > have a section below </show-page> that looks something like this:
>
> > > <extend tag="show-page">
> > >   <old-show-page merge>
> > >     <if test="@current_user.admin?">
> > >       <my-div:>
> > >         do stuff
> > >       </my-div:>
> > >       <append-content:>
> > >         Do more stuff
> > > end
>
> > > Nice.  DRY.  Debuggable and clear.  Supported?
>
> > > The only way I can think of getting close is by throwing a bunch of
> > > extend tag definitions inside of a condition in application.dryml.  No!

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to