summaryrefslogtreecommitdiff
path: root/pharo-mooc/tiny-blog/src/TinyBlog-Components/TBSession.class.st
blob: f56c40bd44b73d4eb38ff0c073525b780b3411cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Class {
	#name : 'TBSession',
	#superclass : 'WASession',
	#instVars : [
		'currentAdmin'
	],
	#category : 'TinyBlog-Components',
	#package : 'TinyBlog-Components'
}

{ #category : 'accessing' }
TBSession >> currentAdmin [

	^ currentAdmin
]

{ #category : 'accessing' }
TBSession >> currentAdmin: anObject [

	currentAdmin := anObject
]

{ #category : 'testing' }
TBSession >> isLogged [
	^ self currentAdmin notNil
]

{ #category : 'initialization' }
TBSession >> reset [
	currentAdmin := nil.
	self requestContext redirectTo: self application url.
	self unregister
]