summaryrefslogtreecommitdiff
path: root/pharo-mooc/tiny-blog/src/TinyBlog-Components/TBSession.class.st
diff options
context:
space:
mode:
Diffstat (limited to 'pharo-mooc/tiny-blog/src/TinyBlog-Components/TBSession.class.st')
-rw-r--r--pharo-mooc/tiny-blog/src/TinyBlog-Components/TBSession.class.st33
1 files changed, 33 insertions, 0 deletions
diff --git a/pharo-mooc/tiny-blog/src/TinyBlog-Components/TBSession.class.st b/pharo-mooc/tiny-blog/src/TinyBlog-Components/TBSession.class.st
new file mode 100644
index 0000000..f56c40b
--- /dev/null
+++ b/pharo-mooc/tiny-blog/src/TinyBlog-Components/TBSession.class.st
@@ -0,0 +1,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
+]