How can I model a use-case with different permissions?

52 views
Skip to first unread message

Raphael

unread,
Nov 2, 2011, 7:23:12 PM11/2/11
to UML Forum
Hello,

I'm modeling a use case diagram of a library system. Both the
librarian and the user can update user data. The user can only change
his own information and librarian can change information off all
users. This should be modeled in a single use case "update user" which
both librarian and user can execute or I should make two use cases,
one for the user change his account and one for the librarian change
all user accounts?

Sorry if I weren't clear enough, but my english is not very good.

Remy Fannader

unread,
Nov 3, 2011, 4:59:29 AM11/3/11
to umlf...@googlegroups.com
Identification and authorization are transverse functionalities that must be managed independently of use cases.
For that purpose you need:
- Clear-cut distinction between agents (actual person interacting with the system) and role (symbolic placeholder created by the system for the duration of the session.
- Powertypes used by the system to manage partitions of agents, objects and activities depending on authorizations.
http://caminao.wordpress.com/who-is-to-use-the-system/
http://caminao.wordpress.com/how-to-implement-symbolic-representations/patterns/functional-patterns/users/
http://caminao.wordpress.com/how-to-implement-symbolic-representations/patterns/functional-patterns/powertypes/
Remy


--
You received this message because you are subscribed to the Google
Groups "UML Forum" group.
Public website: www.umlforum.com
To post to this group, send email to umlf...@googlegroups.com
To unsubscribe from this group, send email to
umlforum+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/umlforum?hl=en?hl=en

RJB

unread,
Nov 3, 2011, 4:12:54 PM11/3/11
to UML Forum
You have two users with different goals in this case. It would be
wise to
document them as two different use cases:
Change my information
Change users information
perhaps.

As a rough rule it is better to have two simple use cases than one
messy use case -- In My Humble Opinion.

These may well include some common steps.

In the UML you would show two use cases (bubbles) and two Actors
[stick people]
and connect
[User] ------- (Change my information)
[Librarian] ---(Change users information)

If the Librarian can change their own information ... then you connect
[Librarian] to (Change my information),
if not don't. Or you can just use a special ---|> arrow to say "A
Librarian is a special kind of User"...

There is (I hate to say it) an <<include>> stereotype to show that two
or more use cases share some logic.
See Martin Fowler's UML Distilled, pages 102 and 103 or Craig Larman's
Applying UML and Patterns Chapter 17 pages 475-500.

I hope this helps
RJB

H. S. Lahman

unread,
Nov 3, 2011, 4:36:15 PM11/3/11
to umlf...@googlegroups.com
Responding to Raphael...

You're English is fine. The difficulty is that this homework problem
shows up on this forum every semester. These forums are not intended to
do your homework for you. Grinding through it is part of the learning
process.

--
Life is the only flaw in an otherwise perfect nonexistence
-- Schopenhauer

Rene Descartes went into a bar. The bartender asked if he would like a drink. Descartes said, "I think not," and disappeared.

H. S. Lahman
H.la...@verizon.net
software blog: http://pathfinderpeople.blogs.com/hslahman/index.html

H. S. Lahman

unread,
Nov 3, 2011, 5:04:12 PM11/3/11
to umlf...@googlegroups.com
Responding to Fannader...

> Identification and authorization are transverse functionalities that
> must be managed independently of use cases.
> For that purpose you need:
> - Clear-cut distinction between agents (actual person interacting with
> the system) and role (symbolic placeholder created by the system for
> the duration of the session.
> - Powertypes used by the system to manage partitions of agents,
> objects and activities depending on authorizations.
> http://caminao.wordpress.com/who-is-to-use-the-system/
> http://caminao.wordpress.com/how-to-implement-symbolic-representations/patterns/functional-patterns/users/
> http://caminao.wordpress.com/how-to-implement-symbolic-representations/patterns/functional-patterns/powertypes/

The poor kid is just asking how he should organize his use cases, not
how to design an aircraft control system!

@OP. To avoid getting confused over this, think about what you, as a
user, would have to do to use this application (i.e., what steps you
would have to take at the keyboard). Then organize the steps by putting
those that are logically related or done at different times in their own
use cases. In particular, ask yourself how the software will know whose
data to update.

Raphael

unread,
Nov 4, 2011, 6:19:20 AM11/4/11
to UML Forum
H. S. Lahman,

I don't like to have my homework made. I thought that could be a
common problem when modeling, so I wanted to know how to deal with
this kind of situation. I have a opinion, but I wanted to make sure
whether it was good or not. I tried to search at google, but I didn't
know exactly what I should look for. I could simply search for
"librarian system use case", and "have my homework made" but that was
not my intention. I wanted to do do it myself and learn how to model
this situation. I apologize if my question was too simple. Again, I
tried to search, but I didn't know what I should look for.

I hope I wasn't rude. Thanks.
> H.lah...@verizon.net
> software blog:http://pathfinderpeople.blogs.com/hslahman/index.html

Raphael

unread,
Nov 4, 2011, 6:23:32 AM11/4/11
to UML Forum
Thanks RJB, that answer my question. I had modeled that way, but I as
insecure if that would be a smart choice.

Raphael

unread,
Nov 4, 2011, 6:27:14 AM11/4/11
to UML Forum
Thanks Remmy for you answer. It's a little bit complicated, but I'm
trying to understand.

On 3 nov, 06:59, Remy Fannader <cami...@gmail.com> wrote:
> Identification and authorization are transverse functionalities that must
> be managed independently of use cases.
> For that purpose you need:
> - Clear-cut distinction between agents (actual person interacting with the
> system) and role (symbolic placeholder created by the system for the
> duration of the session.
> - Powertypes used by the system to manage partitions of agents, objects and
> activities depending on authorizations.http://caminao.wordpress.com/who-is-to-use-the-system/http://caminao.wordpress.com/how-to-implement-symbolic-representation...http://caminao.wordpress.com/how-to-implement-symbolic-representation...
Reply all
Reply to author
Forward
0 new messages