trait ProtoUser extends AnyRef
A prototypical user class with abstractions to the underlying storage
- Alphabetic
- By Inheritance
- ProtoUser
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
FieldPointerBridge
extends AnyRef
- Attributes
- protected
-
abstract
type
FieldPointerType
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
-
case class
MenuItem
(name: String, path: List[String], loggedIn: Boolean) extends Product with Serializable
A helper class that holds menu items for the path
-
abstract
type
TheUserType
The underlying record for the User
-
trait
UserBridge
extends AnyRef
Bridges from TheUserType to methods used in this class
Bridges from TheUserType to methods used in this class
- Attributes
- protected
Abstract Value Members
-
implicit abstract
def
buildFieldBridge(from: FieldPointerType): FieldPointerBridge
Based on a FieldPointer, build a FieldPointerBridge
Based on a FieldPointer, build a FieldPointerBridge
- Attributes
- protected
-
abstract
def
computeFieldFromPointer(instance: TheUserType, pointer: FieldPointerType): Box[BaseField]
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
-
abstract
def
createNewUserInstance(): TheUserType
Create a new instance of the User
Create a new instance of the User
- Attributes
- protected
-
abstract
def
editFields: List[FieldPointerType]
The list of fields presented to the user for editing
-
abstract
def
findUserByUniqueId(id: String): Box[TheUserType]
Given a unique id, find the user
Given a unique id, find the user
- Attributes
- protected
-
abstract
def
findUserByUserName(username: String): Box[TheUserType]
Given an username (probably email address), find the user
Given an username (probably email address), find the user
- Attributes
- protected
-
abstract
def
signupFields: List[FieldPointerType]
The list of fields presented to the user at sign-up
-
implicit abstract
def
typeToBridge(in: TheUserType): UserBridge
Convert an instance of TheUserType to the Bridge trait
Convert an instance of TheUserType to the Bridge trait
- Attributes
- protected
-
abstract
def
userFromStringId(id: String): Box[TheUserType]
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- lazy val ItemList: List[MenuItem]
-
def
actionsAfterSignup(theUser: TheUserType, func: () ⇒ Nothing): Nothing
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
autologinFunc: Box[() ⇒ Unit]
This function is given a chance to log in a user programmatically when needed
-
def
basePath: List[String]
The base path for the user related URLs.
The base path for the user related URLs. Override this method to change the base path
- def bccEmail: Box[String]
-
def
capturePreLoginState(): () ⇒ Unit
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
- def changePassword: NodeSeq
-
def
changePasswordMenuLoc: Box[Menu]
The menu item for changing password (make this "Empty" to disable)
-
def
changePasswordMenuLocParams: List[LocParam[Unit]]
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
-
lazy val
changePasswordPath: List[String]
The computed path for change password screen
- def changePasswordSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq
-
def
changePasswordSuffix: String
The path suffix for the change password screen
- def changePasswordXhtml: Elem
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
createUserMenuLoc: Box[Menu]
The menu item for creating the user/sign up (make this "Empty" to disable)
-
def
createUserMenuLocParams: List[LocParam[Unit]]
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
- def currentUser: Box[TheUserType]
- def currentUserId: Box[String]
-
def
destroySessionOnLogin: Boolean
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
-
def
doWithUser[T](u: Box[TheUserType])(f: ⇒ T): T
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.
- def edit: NodeSeq
-
lazy val
editPath: List[String]
The computed path for the edit screen
- def editSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq
-
def
editSuffix: String
The path suffix for the edit screen
-
def
editUserMenuLoc: Box[Menu]
The menu item for editing the user (make this "Empty" to disable)
-
def
editUserMenuLocParams: List[LocParam[Unit]]
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
- def editXhtml(user: TheUserType): Elem
- def emailFrom: String
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
generateResetEmailBodies(user: TheUserType, resetLink: String): List[MailBodyType]
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
-
def
generateValidationEmailBodies(user: TheUserType, resetLink: String): List[MailBodyType]
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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
globalUserLocParams: List[LocParam[Unit]]
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
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
homePage: String
The application's home page
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
localForm(user: TheUserType, ignorePassword: Boolean, fields: List[FieldPointerType]): NodeSeq
- Attributes
- protected
- def logUserIdIn(id: String): Unit
- def logUserIn(who: TheUserType): Unit
- def logUserIn(who: TheUserType, postLogin: () ⇒ Nothing): Nothing
- def logUserOut(): Unit
- def loggedIn_?: Boolean
- def login: NodeSeq
-
def
loginFirst: If
A Menu.LocParam for testing if the user is logged in and if they're not, redirect them to the login page
-
def
loginMenuLoc: Box[Menu]
The menu item for login (make this "Empty" to disable)
-
def
loginMenuLocParams: List[LocParam[Unit]]
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
-
def
loginPageURL: String
Return the URL of the "login" page
-
lazy val
loginPath: List[String]
The computed path for the login screen
- def loginSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq
-
def
loginSuffix: String
The path suffix for the login screen
- def loginXhtml: Elem
- def logout: Nothing
- def logoutCurrentUser: Unit
-
def
logoutMenuLoc: Box[Menu]
The menu item for logout (make this "Empty" to disable)
-
def
logoutMenuLocParams: List[LocParam[Unit]]
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
-
lazy val
logoutPath: List[String]
The computed pat for logout
-
def
logoutSuffix: String
The path suffix for the logout screen
- def lostPassword: NodeSeq
-
def
lostPasswordMenuLoc: Box[Menu]
The menu item for lost password (make this "Empty" to disable)
-
def
lostPasswordMenuLocParams: List[LocParam[Unit]]
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
-
lazy val
lostPasswordPath: List[String]
The computed path for the lost password screen
- def lostPasswordSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq
-
def
lostPasswordSuffix: String
The path suffix for the lost password screen
- def lostPasswordXhtml: Elem
-
def
menuNameSuffix: String
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
-
def
menus: List[Menu]
An alias for the sitemap property
-
def
mutateUserOnEdit(user: TheUserType): TheUserType
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
-
def
mutateUserOnSignup(user: TheUserType): TheUserType
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
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
niceName(inst: TheUserType): String
Get a nice name for the user
-
def
niceNameWEmailLink(inst: TheUserType): Elem
Get an email link for the user
-
def
notLoggedIn_?: Boolean
Inverted loggedIn_?
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- val onLogIn: List[(TheUserType) ⇒ Unit]
- val onLogOut: List[(Box[TheUserType]) ⇒ Unit]
- def passwordReset(id: String): NodeSeq
- def passwordResetEmailSubject: String
- def passwordResetMailBody(user: TheUserType, resetLink: String): Elem
-
lazy val
passwordResetPath: List[String]
The computed path for the reset password screen
-
def
passwordResetSuffix: String
The path suffix for the reset password screen
- def passwordResetXhtml: Elem
-
def
resetPasswordMenuLoc: Box[Menu]
The menu item for resetting the password (make this "Empty" to disable)
-
def
resetPasswordMenuLocParams: List[LocParam[Unit]]
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
- def resetPasswordSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq
-
def
screenWrap: Box[Node]
What template are you going to wrap the various nodes in
-
def
sendPasswordReset(email: String): Unit
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.
-
def
sendValidationEmail(user: TheUserType): Unit
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.
-
def
shortName(inst: TheUserType): String
Get a nice name for the user
-
lazy val
signUpPath: List[String]
The computed path for the sign up screen
-
def
signUpSuffix: String
The path suffix for the sign up screen
- def signup: NodeSeq
- def signupMailBody(user: TheUserType, validationLink: String): Elem
- def signupMailSubject: String
- def signupSubmitButton(name: String, func: () ⇒ Any = () => {}): NodeSeq
- def signupXhtml(user: TheUserType): Elem
- lazy val sitemap: List[Menu]
-
def
sitemapMutator: (SiteMap) ⇒ SiteMap
The SiteMap mutator function
- def skipEmailValidation: Boolean
-
def
snarfLastItem: String
- Attributes
- protected
- def standardSubmitButton(name: String, func: () ⇒ Any = () => {}): Elem
-
def
superUser_?: Boolean
Is there a user logged in and are they a superUser?
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def testLoggedIn(page: String): Boolean
-
lazy val
testLogginIn: If
A Menu.LocParam to test if the user is logged in
-
lazy val
testSuperUser: If
A Menu.LocParam to test if the user is a super user
-
def
thePath(end: String): List[String]
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
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def userMenu: List[Node]
-
def
userNameFieldString: String
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
-
def
userNameNotFoundString: String
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")
-
def
validateSignup(user: TheUserType): List[FieldError]
Override this method to validate the user signup (eg by adding captcha verification)
- def validateUser(id: String): NodeSeq
-
def
validateUserMenuLoc: Box[Menu]
The menu item for validating a user (make this "Empty" to disable)
-
def
validateUserMenuLocParams: List[LocParam[Unit]]
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
-
lazy val
validateUserPath: List[String]
The calculated path to the user validation screen
-
def
validateUserSuffix: String
The path suffix for the validate user screen
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
wrapIt(in: NodeSeq): NodeSeq
- Attributes
- protected
-
object
AddUserMenusAfter
extends LocParam[Any] with Product with Serializable
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
-
object
AddUserMenusHere
extends LocParam[Any] with Product with Serializable
replace the menu that has this LocParam with the User's menu items
-
object
AddUserMenusUnder
extends LocParam[Any] with Product with Serializable
Insert this LocParam into your menu if you want the User's menu items to be children of that menu
- object editFunc extends RequestVar[Box[() ⇒ NodeSeq]]
-
object
loginRedirect
extends SessionVar[Box[String]]
If you want to redirect a user to a different page after login, put the page here
-
object
signupFunc
extends RequestVar[Box[() ⇒ NodeSeq]]
- Attributes
- protected