[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-286) SeamTest - Add support for authenticated user
by Bradley Smith (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-286?page=comments#action_12346507 ]
Bradley Smith commented on JBSEAM-286:
--------------------------------------
Ok - all modified files have been re-uploaded - be sure to use the Nov. 8 versions. Also, as requested, diffs are here in the comments.
Thanks,
Brad Smith
> SeamTest - Add support for authenticated user
> ---------------------------------------------
>
> Key: JBSEAM-286
> URL: http://jira.jboss.com/jira/browse/JBSEAM-286
> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Core
> Affects Versions: 1.0.1
> Environment: All
> Reporter: Bradley Smith
> Assigned To: Gavin King
> Fix For: 1.1.0.CR1
>
> Attachments: MockExternalContext.java, MockExternalContext.java, MockHttpServletRequest.java, MockHttpServletRequest.java, SeamTest.java, SeamTest.java
>
>
> Add a property of type Principal and another property (maybe of type Group []?) to Script. The Principal should be used by the MockHttpServletRequest to represent and authenticated user. The Group [] property should be used by the MockHttpServletRequest to support the isUserInRole() implementation.
> These properties ideally should be settable by overriding the setup() method of Script.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-286) SeamTest - Add support for authenticated user
by Bradley Smith (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-286?page=all ]
Bradley Smith updated JBSEAM-286:
---------------------------------
Attachment: MockHttpServletRequest.java
Here is the modified MockHttpServletRequest (again - no code reformatting). Diff is below.
=========================================================================
bash-2.05b$ diff MockHttpServletRequest-orig.java MockHttpServletRequest.java
12a13
> import java.security.acl.Group;
23a25
> import org.jboss.security.SimplePrincipal;
37c39,43
<
---
> // security properties
> private Principal principal;
> private Group roles;
> private boolean grantAllRoles;
>
39a46,60
> this(session,null,null,true);
> }
>
> public MockHttpServletRequest(HttpSession session, Principal principal)
> {
> this(session,principal,null,true /* grant all roles */);
> }
>
> public MockHttpServletRequest(HttpSession session, Principal principal, Group roles)
> {
> this(session,principal,roles,false);
> }
>
> public MockHttpServletRequest(HttpSession session, Principal principal, Group roles, boolean grantAllRoles)
> {
40a62,64
> this.principal = principal;
> this.roles = roles;
> this.grantAllRoles = grantAllRoles;
123,124c147
< //TODO
< return null;
---
> return this.principal == null ? null : this.principal.getName();
127c150
< public boolean isUserInRole(String arg0)
---
> public boolean isUserInRole(String role)
129c152,155
< return true;
---
> if (roles != null) {
> return this.roles.isMember(new SimplePrincipal(role));
> }
> return this.grantAllRoles ? true : false;
134,135c160
< //TODO
< return null;
---
> return this.principal;
> SeamTest - Add support for authenticated user
> ---------------------------------------------
>
> Key: JBSEAM-286
> URL: http://jira.jboss.com/jira/browse/JBSEAM-286
> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Core
> Affects Versions: 1.0.1
> Environment: All
> Reporter: Bradley Smith
> Assigned To: Gavin King
> Fix For: 1.1.0.CR1
>
> Attachments: MockExternalContext.java, MockExternalContext.java, MockHttpServletRequest.java, MockHttpServletRequest.java, SeamTest.java, SeamTest.java
>
>
> Add a property of type Principal and another property (maybe of type Group []?) to Script. The Principal should be used by the MockHttpServletRequest to represent and authenticated user. The Group [] property should be used by the MockHttpServletRequest to support the isUserInRole() implementation.
> These properties ideally should be settable by overriding the setup() method of Script.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-286) SeamTest - Add support for authenticated user
by Bradley Smith (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-286?page=all ]
Bradley Smith updated JBSEAM-286:
---------------------------------
Attachment: MockExternalContext.java
Here is the modified MockExternalContext.java file again - also I did not reformat the source code. Diff is supplied below:
======================================================================
bash-2.05b$ diff MockExternalContext-orig.java MockExternalContext.java
13a14
> import java.security.acl.Group;
35c36,37
<
---
> private Principal principal;
> private Group roles;
60a63,68
> public MockExternalContext(MockServletContext context, HttpSession session, Principal principal, Group roles)
> {
> this(context,session);
> this.request = new MockHttpServletRequest(session, principal, roles);
> }
>
> SeamTest - Add support for authenticated user
> ---------------------------------------------
>
> Key: JBSEAM-286
> URL: http://jira.jboss.com/jira/browse/JBSEAM-286
> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Core
> Affects Versions: 1.0.1
> Environment: All
> Reporter: Bradley Smith
> Assigned To: Gavin King
> Fix For: 1.1.0.CR1
>
> Attachments: MockExternalContext.java, MockExternalContext.java, MockHttpServletRequest.java, SeamTest.java, SeamTest.java
>
>
> Add a property of type Principal and another property (maybe of type Group []?) to Script. The Principal should be used by the MockHttpServletRequest to represent and authenticated user. The Group [] property should be used by the MockHttpServletRequest to support the isUserInRole() implementation.
> These properties ideally should be settable by overriding the setup() method of Script.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-286) SeamTest - Add support for authenticated user
by Bradley Smith (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-286?page=all ]
Bradley Smith updated JBSEAM-286:
---------------------------------
Attachment: SeamTest.java
Here is the modified SeamTest.java again. This time, I did not reformat the source. Also, the file diffs for rev. 1.43 and my changes are listed below:
====================================================================
bash-2.05b$ diff -w SeamTest-orig.java SeamTest.java
11a12,13
> import java.security.Principal;
> import java.security.acl.Group;
81a84,85
> private Principal principal;
> private Group roles;
88a93,101
> protected Script(Principal principal, Group roles) {
> this.principal = principal;
> this.roles = roles;
> }
>
> protected Script(Principal principal) {
> this(principal,null);
> }
>
195c208
< externalContext = new MockExternalContext(servletContext, session);
---
> externalContext = new MockExternalContext(servletContext, session, principal, roles);
> SeamTest - Add support for authenticated user
> ---------------------------------------------
>
> Key: JBSEAM-286
> URL: http://jira.jboss.com/jira/browse/JBSEAM-286
> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Core
> Affects Versions: 1.0.1
> Environment: All
> Reporter: Bradley Smith
> Assigned To: Gavin King
> Fix For: 1.1.0.CR1
>
> Attachments: MockExternalContext.java, MockHttpServletRequest.java, SeamTest.java, SeamTest.java
>
>
> Add a property of type Principal and another property (maybe of type Group []?) to Script. The Principal should be used by the MockHttpServletRequest to represent and authenticated user. The Group [] property should be used by the MockHttpServletRequest to support the isUserInRole() implementation.
> These properties ideally should be settable by overriding the setup() method of Script.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-391) <end-conversation /> ends task
by Peter Muir (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-391?page=all ]
Peter Muir updated JBSEAM-391:
------------------------------
Environment: CVS @ 13:50 -0000 2006/11/06 (was: Tested against 1.0.1 but looks unaltered in CVS)
> <end-conversation /> ends task
> ------------------------------
>
> Key: JBSEAM-391
> URL: http://jira.jboss.com/jira/browse/JBSEAM-391
> Project: JBoss Seam
> Issue Type: Bug
> Components: BPM
> Affects Versions: 1.1.0.BETA2
> Environment: CVS @ 13:50 -0000 2006/11/06
> Reporter: Peter Muir
> Attachments: pageflow-transition-endTask.patch, pageflow-transition.patch
>
>
> The reference manual says 'Optionally, we can specify a transition name. In this case, Seam will signal the end of the current task in the overarching business process.' (4.2.5)
> Whether or not you specify a transition on <end-conversation /> if a task instance is active then it will be ended.
> This is because in Page.java the execute method has
> if ( transition == null )
> {
> task.end();
> }
> else
> {
> task.end(transition);
> }
> How about adding endTask="true|false" (default true) to end-conversation and altering Page.java accordingly?
> This functionality would be useful if you want to 'cancel' out of a pageflow and returrn to the task at a later date.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months