how to lock certain field in /user_mgt/edit ?

24 views
Skip to first unread message

wm

unread,
Nov 15, 2015, 2:43:56 AM11/15/15
to Lift
e.g.

I don't want user change email after sign-up, it's read-only that user cannot edit.

Thx.

Sureerat Phattara-ampornchai

unread,
Nov 25, 2015, 12:12:07 AM11/25/15
to Lift
Hello,

If you are using ProtoUser, you may use "editFields" to specified the fields you want to show in edit form.

object User extends User with MetaMegaProtoUser[User] {
...
override def editFields = List(firstName, lastName, locale, timezone, textArea)
...
}

Hope this help.

Mo

Peter Petersson

unread,
Nov 25, 2015, 3:05:20 PM11/25/15
to lif...@googlegroups.com
... and also in the same file you also may want to

override def  editUserMenuLoc: Box[net.liftweb.sitemap.Menu] = Box(Empty)

to remove the edit menu entry (if pressent).

best regards Peter Petersson
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages