Trait

net.liftweb.proto

ProtoUser

Related Doc: package proto

Permalink

trait ProtoUser extends AnyRef

A prototypical user class with abstractions to the underlying storage

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ProtoUser
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. trait FieldPointerBridge extends AnyRef

    Permalink
    Attributes
    protected
  2. abstract type FieldPointerType

    Permalink

    A generic representation of a field.

    A generic representation of a field. For example, this represents the abstract "name" field and is used along with an instance of TheCrudType to compute the BaseField that is the "name" field on the specific instance of TheCrudType

  3. case class MenuItem(name: String, path: List[String], loggedIn: Boolean) extends Product with Serializable

    Permalink

    A helper class that holds menu items for the path

  4. abstract type TheUserType

    Permalink

    The underlying record for the User

  5. trait UserBridge extends AnyRef

    Permalink

    Bridges from TheUserType to methods used in this class

    Bridges from TheUserType to methods used in this class

    Attributes
    protected

Abstract Value Members

  1. implicit abstract def buildFieldBridge(from: FieldPointerType): FieldPointerBridge

    Permalink

    Based on a FieldPointer, build a FieldPointerBridge

    Based on a FieldPointer, build a FieldPointerBridge

    Attributes
    protected
  2. abstract def computeFieldFromPointer(instance: TheUserType, pointer: FieldPointerType): Box[BaseField]

    Permalink

    Given an instance of TheCrudType and FieldPointerType, convert that to an actual instance of a BaseField on the instance of TheCrudType

    Given an instance of TheCrudType and FieldPointerType, convert that to an actual instance of a BaseField on the instance of TheCrudType

    Attributes
    protected
  3. abstract def createNewUserInstance(): TheUserType

    Permalink

    Create a new instance of the User

    Create a new instance of the User

    Attributes
    protected
  4. abstract def editFields: List[FieldPointerType]

    Permalink

    The list of fields presented to the user for editing

  5. abstract def findUserByUniqueId(id: String): Box[TheUserType]

    Permalink

    Given a unique id, find the user

    Given a unique id, find the user

    Attributes
    protected
  6. abstract def findUserByUserName(username: String): Box[TheUserType]

    Permalink

    Given an username (probably email address), find the user

    Given an username (probably email address), find the user

    Attributes
    protected
  7. abstract def signupFields: List[FieldPointerType]

    Permalink

    The list of fields presented to the user at sign-up

  8. implicit abstract def typeToBridge(in: TheUserType): UserBridge

    Permalink

    Convert an instance of TheUserType to the Bridge trait

    Convert an instance of TheUserType to the Bridge trait

    Attributes
    protected
  9. abstract def userFromStringId(id: String): Box[TheUserType]

    Permalink

    Given a String representing the User ID, find the user

    Given a String representing the User ID, find the user

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object AddUserMenusAfter extends LocParam[Any] with Product with Serializable

    Permalink

    Insert this LocParam into your menu if you want the User's menu items to be inserted at the same level and after the item

  5. object AddUserMenusHere extends LocParam[Any] with Product with Serializable

    Permalink

    replace the menu that has this LocParam with the User's menu items

  6. object AddUserMenusUnder extends LocParam[Any] with Product with Serializable

    Permalink

    Insert this LocParam into your menu if you want the User's menu items to be children of that menu

  7. lazy val ItemList: List[MenuItem]

    Permalink
  8. def actionsAfterSignup(theUser: TheUserType, func: () ⇒ Nothing): Nothing

    Permalink

    Override this method to do something else after the user signs up

    Override this method to do something else after the user signs up

    Attributes
    protected
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. var autologinFunc: Box[() ⇒ Unit]

    Permalink

    This function is given a chance to log in a user programmatically when needed

  11. def basePath: List[String]

    Permalink

    The base path for the user related URLs.

    The base path for the user related URLs. Override this method to change the base path

  12. def bccEmail: Box[String]

    Permalink
  13. def capturePreLoginState(): () ⇒ Unit

    Permalink

    If there's any state that you want to capture pre-login to be set post-login (the session is destroyed), then set the state here.

    If there's any state that you want to capture pre-login to be set post-login (the session is destroyed), then set the state here. Just make a function that captures the state... that function will be applied post login.

    Attributes
    protected
  14. def changePassword: NodeSeq

    Permalink
  15. def changePasswordMenuLoc: Box[Menu]

    Permalink

    The menu item for changing password (make this "Empty" to disable)

  16. def changePasswordMenuLocParams: List[LocParam[Unit]]

    Permalink

    The LocParams for the menu item for changing password.

    The LocParams for the menu item for changing password. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  17. lazy val changePasswordPath: List[String]

    Permalink

    The computed path for change password screen

  18. def changePasswordSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq

    Permalink
  19. def changePasswordSuffix: String

    Permalink

    The path suffix for the change password screen

  20. def changePasswordXhtml: Elem

    Permalink
  21. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. def createUserMenuLoc: Box[Menu]

    Permalink

    The menu item for creating the user/sign up (make this "Empty" to disable)

  23. def createUserMenuLocParams: List[LocParam[Unit]]

    Permalink

    The LocParams for the menu item for creating the user/sign up.

    The LocParams for the menu item for creating the user/sign up. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  24. def currentUser: Box[TheUserType]

    Permalink
  25. def currentUserId: Box[String]

    Permalink
  26. def destroySessionOnLogin: Boolean

    Permalink

    By default, destroy the session on login.

    By default, destroy the session on login. Change this is some of the session information needs to be preserved.

    Attributes
    protected
  27. def doWithUser[T](u: Box[TheUserType])(f: ⇒ T): T

    Permalink

    There may be times when you want to be another user for some stack frames.

    There may be times when you want to be another user for some stack frames. Here's how to do it.

  28. def edit: NodeSeq

    Permalink
  29. object editFunc extends RequestVar[Box[() ⇒ NodeSeq]]

    Permalink
  30. lazy val editPath: List[String]

    Permalink

    The computed path for the edit screen

  31. def editSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq

    Permalink
  32. def editSuffix: String

    Permalink

    The path suffix for the edit screen

  33. def editUserMenuLoc: Box[Menu]

    Permalink

    The menu item for editing the user (make this "Empty" to disable)

  34. def editUserMenuLocParams: List[LocParam[Unit]]

    Permalink

    The LocParams for the menu item for editing the user.

    The LocParams for the menu item for editing the user. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  35. def editXhtml(user: TheUserType): Elem

    Permalink
  36. def emailFrom: String

    Permalink
  37. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  38. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  39. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  40. def generateResetEmailBodies(user: TheUserType, resetLink: String): List[MailBodyType]

    Permalink

    Generate the mail bodies to send with the password reset link.

    Generate the mail bodies to send with the password reset link. By default, just an HTML mail body is generated by calling passwordResetMailBody but you can send additional or alternative mail by overriding this method.

    Attributes
    protected
  41. def generateValidationEmailBodies(user: TheUserType, resetLink: String): List[MailBodyType]

    Permalink

    Generate the mail bodies to send with the valdiation link.

    Generate the mail bodies to send with the valdiation link. By default, just an HTML mail body is generated by calling signupMailBody but you can send additional or alternative mail by override this method.

    Attributes
    protected
  42. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  43. def globalUserLocParams: List[LocParam[Unit]]

    Permalink

    If you want to include a LocParam (e.g.

    If you want to include a LocParam (e.g. LocGroup) on all the User menus, add them here

    Attributes
    protected
  44. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  45. def homePage: String

    Permalink

    The application's home page

  46. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  47. def localForm(user: TheUserType, ignorePassword: Boolean, fields: List[FieldPointerType]): NodeSeq

    Permalink
    Attributes
    protected
  48. def logUserIdIn(id: String): Unit

    Permalink
  49. def logUserIn(who: TheUserType): Unit

    Permalink
  50. def logUserIn(who: TheUserType, postLogin: () ⇒ Nothing): Nothing

    Permalink
  51. def logUserOut(): Unit

    Permalink
  52. def loggedIn_?: Boolean

    Permalink
  53. def login: NodeSeq

    Permalink
  54. def loginFirst: If

    Permalink

    A Menu.LocParam for testing if the user is logged in and if they're not, redirect them to the login page

  55. def loginMenuLoc: Box[Menu]

    Permalink

    The menu item for login (make this "Empty" to disable)

  56. def loginMenuLocParams: List[LocParam[Unit]]

    Permalink

    The LocParams for the menu item for login.

    The LocParams for the menu item for login. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  57. def loginPageURL: String

    Permalink

    Return the URL of the "login" page

  58. lazy val loginPath: List[String]

    Permalink

    The computed path for the login screen

  59. object loginRedirect extends SessionVar[Box[String]]

    Permalink

    If you want to redirect a user to a different page after login, put the page here

  60. def loginSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq

    Permalink
  61. def loginSuffix: String

    Permalink

    The path suffix for the login screen

  62. def loginXhtml: Elem

    Permalink
  63. def logout: Nothing

    Permalink
  64. def logoutCurrentUser: Unit

    Permalink
  65. def logoutMenuLoc: Box[Menu]

    Permalink

    The menu item for logout (make this "Empty" to disable)

  66. def logoutMenuLocParams: List[LocParam[Unit]]

    Permalink

    The LocParams for the menu item for logout.

    The LocParams for the menu item for logout. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  67. lazy val logoutPath: List[String]

    Permalink

    The computed pat for logout

  68. def logoutSuffix: String

    Permalink

    The path suffix for the logout screen

  69. def lostPassword: NodeSeq

    Permalink
  70. def lostPasswordMenuLoc: Box[Menu]

    Permalink

    The menu item for lost password (make this "Empty" to disable)

  71. def lostPasswordMenuLocParams: List[LocParam[Unit]]

    Permalink

    The LocParams for the menu item for lost password.

    The LocParams for the menu item for lost password. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  72. lazy val lostPasswordPath: List[String]

    Permalink

    The computed path for the lost password screen

  73. def lostPasswordSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq

    Permalink
  74. def lostPasswordSuffix: String

    Permalink

    The path suffix for the lost password screen

  75. def lostPasswordXhtml: Elem

    Permalink
  76. def menuNameSuffix: String

    Permalink

    If you have more than 1 ProtoUser in your application, you'll need to distinguish the menu names.

    If you have more than 1 ProtoUser in your application, you'll need to distinguish the menu names. Do so by changing the menu name suffix so that there are no name clashes

    Attributes
    protected
  77. def menus: List[Menu]

    Permalink

    An alias for the sitemap property

  78. def mutateUserOnEdit(user: TheUserType): TheUserType

    Permalink

    If there's any mutation to do to the user on retrieval for editing, override this method and mutate the user.

    If there's any mutation to do to the user on retrieval for editing, override this method and mutate the user. This can be used to pull query parameters from the request and assign certain fields. Issue #722

    user

    the user to mutate

    returns

    the mutated user

    Attributes
    protected
  79. def mutateUserOnSignup(user: TheUserType): TheUserType

    Permalink

    If there's any mutation to do to the user on creation for signup, override this method and mutate the user.

    If there's any mutation to do to the user on creation for signup, override this method and mutate the user. This can be used to pull query parameters from the request and assign certain fields. . Issue #722

    user

    the user to mutate

    returns

    the mutated user

    Attributes
    protected
  80. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  81. def niceName(inst: TheUserType): String

    Permalink

    Get a nice name for the user

  82. def niceNameWEmailLink(inst: TheUserType): Elem

    Permalink

    Get an email link for the user

  83. def notLoggedIn_?: Boolean

    Permalink

    Inverted loggedIn_?

  84. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  85. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  86. var onLogIn: List[(TheUserType) ⇒ Unit]

    Permalink
  87. var onLogOut: List[(Box[TheUserType]) ⇒ Unit]

    Permalink
  88. def passwordReset(id: String): NodeSeq

    Permalink
  89. def passwordResetEmailSubject: String

    Permalink
  90. def passwordResetMailBody(user: TheUserType, resetLink: String): Elem

    Permalink
  91. lazy val passwordResetPath: List[String]

    Permalink

    The computed path for the reset password screen

  92. def passwordResetSuffix: String

    Permalink

    The path suffix for the reset password screen

  93. def passwordResetXhtml: Elem

    Permalink
  94. def resetPasswordMenuLoc: Box[Menu]

    Permalink

    The menu item for resetting the password (make this "Empty" to disable)

  95. def resetPasswordMenuLocParams: List[LocParam[Unit]]

    Permalink

    The LocParams for the menu item for resetting the password.

    The LocParams for the menu item for resetting the password. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  96. def resetPasswordSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq

    Permalink
  97. def screenWrap: Box[Node]

    Permalink

    What template are you going to wrap the various nodes in

  98. def sendPasswordReset(email: String): Unit

    Permalink

    Send password reset email to the user.

    Send password reset email to the user. The XHTML version of the mail body is generated by calling passwordResetMailBody. You can customize the mail sent to users by overriding generateResetEmailBodies to send non-HTML mail or alternative mail bodies.

  99. def sendValidationEmail(user: TheUserType): Unit

    Permalink

    Send validation email to the user.

    Send validation email to the user. The XHTML version of the mail body is generated by calling signupMailBody. You can customize the mail sent to users by override generateValidationEmailBodies to send non-HTML mail or alternative mail bodies.

  100. def shortName(inst: TheUserType): String

    Permalink

    Get a nice name for the user

  101. lazy val signUpPath: List[String]

    Permalink

    The computed path for the sign up screen

  102. def signUpSuffix: String

    Permalink

    The path suffix for the sign up screen

  103. def signup: NodeSeq

    Permalink
  104. object signupFunc extends RequestVar[Box[() ⇒ NodeSeq]]

    Permalink
    Attributes
    protected
  105. def signupMailBody(user: TheUserType, validationLink: String): Elem

    Permalink
  106. def signupMailSubject: String

    Permalink
  107. def signupSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq

    Permalink
  108. def signupXhtml(user: TheUserType): Elem

    Permalink
  109. lazy val sitemap: List[Menu]

    Permalink
  110. def sitemapMutator: (SiteMap) ⇒ SiteMap

    Permalink

    The SiteMap mutator function

  111. def skipEmailValidation: Boolean

    Permalink
  112. def snarfLastItem: String

    Permalink
    Attributes
    protected
  113. def standardSubmitButton(name: String, func: () ⇒ Any = () => {}): Elem

    Permalink
  114. def superUser_?: Boolean

    Permalink

    Is there a user logged in and are they a superUser?

  115. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  116. def testLoggedIn(page: String): Boolean

    Permalink
  117. lazy val testLogginIn: If

    Permalink

    A Menu.LocParam to test if the user is logged in

  118. lazy val testSuperUser: If

    Permalink

    A Menu.LocParam to test if the user is a super user

  119. def thePath(end: String): List[String]

    Permalink

    Calculate the path given a suffix by prepending the basePath to the suffix

    Calculate the path given a suffix by prepending the basePath to the suffix

    Attributes
    protected
  120. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  121. def userMenu: List[Node]

    Permalink
  122. def userNameFieldString: String

    Permalink

    How do we prompt the user for the username.

    How do we prompt the user for the username. By default, it's S.?("email.address"), you can can change it to something else

  123. def userNameNotFoundString: String

    Permalink

    The string that's generated when the user name is not found.

    The string that's generated when the user name is not found. By default: S.?("email.address.not.found")

  124. def validateSignup(user: TheUserType): List[FieldError]

    Permalink

    Override this method to validate the user signup (eg by adding captcha verification)

  125. def validateUser(id: String): NodeSeq

    Permalink
  126. def validateUserMenuLoc: Box[Menu]

    Permalink

    The menu item for validating a user (make this "Empty" to disable)

  127. def validateUserMenuLocParams: List[LocParam[Unit]]

    Permalink

    The LocParams for the menu item for validating a user.

    The LocParams for the menu item for validating a user. Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!

    Attributes
    protected
  128. lazy val validateUserPath: List[String]

    Permalink

    The calculated path to the user validation screen

  129. def validateUserSuffix: String

    Permalink

    The path suffix for the validate user screen

  130. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  131. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  132. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  133. def wrapIt(in: NodeSeq): NodeSeq

    Permalink
    Attributes
    protected

Inherited from AnyRef

Inherited from Any

Ungrouped