Ext JS 4.1.1 support in core/basepack master

66 views
Skip to first unread message

nomadcoder

unread,
Aug 4, 2012, 1:17:52 PM8/4/12
to net...@googlegroups.com
Please, give it a try.

--
Denis Gorin
@nomadcoder
author of @netzke

Charles Gan

unread,
Aug 11, 2012, 8:43:56 AM8/11/12
to net...@googlegroups.com
hi sir,

   I have a question regarding on how to implement a user access rights using netzke? that is how can restrict a user from inserting , updating or deleting a record in a model.

   example. how can prevent a user to insert on the model if it failed

    if current_user.can_create?
       # proceed to add record
    else
      # display a message user can add new records
    end

   Second , question is how can i make the display of a password field hidden upon entry on the Gridpanel. There is not much documentation  on this matter sir.

 
thank you.


Charles Gan
  

--- On Sun, 8/5/12, nomadcoder <nmc...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Netzke" group.
To post to this group, send email to net...@googlegroups.com.
To unsubscribe from this group, send email to netzke+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/netzke/-/ylSQfZT7vwUJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Charles Gan

unread,
Aug 11, 2012, 9:41:50 AM8/11/12
to net...@googlegroups.com
Sir,
  
   Found a solution on my own question.

   its thru your prohibit method on netzke gridpanel

  eg.

  <%= netzke :areas,
  :class_name => "Netzke::Basepack::GridPanel",
  :model => "Area",
  :height => 400,
  :columns => [:areacode, :description],
  :prohibit_create => !current_user.verify_rights("AREA","I"),
  :prohibit_update => !current_user.verify_rights("AREA","E"),
  :prohibit_delete => !current_user.verify_rights("AREA","D")

%>

  Although the "Add in Form" button in bbar is still enabled and working. I can still create a new record in the model. How can you enabled/disable this. although the prohibit_update already control the enabled/disable of both the edit button and the Edit in form button.

Charles Gan
  


--- On Sat, 8/11/12, Charles Gan <chat...@yahoo.com.ph> wrote:
Reply all
Reply to author
Forward
0 new messages