From 3ef62a0570055da710328937e7f65dbb2c027c62 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 12 Aug 2002 06:17:09 +0000 Subject: import rt 2.0.14 --- rt/docs/design_docs/CARS | 66 +++++ rt/docs/design_docs/TransactionTypes.txt | 48 +++ rt/docs/design_docs/acls | 206 +++++++++++++ rt/docs/design_docs/basic-definitions.txt | 54 ++++ rt/docs/design_docs/cli_spec | 354 +++++++++++++++++++++++ rt/docs/design_docs/cvs_integration | 164 +++++++++++ rt/docs/design_docs/evil_plans | 167 +++++++++++ rt/docs/design_docs/link-definitions.txt | 143 +++++++++ rt/docs/design_docs/local_hacking | 32 ++ rt/docs/design_docs/subscription-definitions.txt | 113 ++++++++ rt/docs/design_docs/users | 14 + 11 files changed, 1361 insertions(+) create mode 100755 rt/docs/design_docs/CARS create mode 100755 rt/docs/design_docs/TransactionTypes.txt create mode 100644 rt/docs/design_docs/acls create mode 100644 rt/docs/design_docs/basic-definitions.txt create mode 100644 rt/docs/design_docs/cli_spec create mode 100644 rt/docs/design_docs/cvs_integration create mode 100644 rt/docs/design_docs/evil_plans create mode 100644 rt/docs/design_docs/link-definitions.txt create mode 100644 rt/docs/design_docs/local_hacking create mode 100755 rt/docs/design_docs/subscription-definitions.txt create mode 100644 rt/docs/design_docs/users (limited to 'rt/docs/design_docs') diff --git a/rt/docs/design_docs/CARS b/rt/docs/design_docs/CARS new file mode 100755 index 000000000..a4d2a78c5 --- /dev/null +++ b/rt/docs/design_docs/CARS @@ -0,0 +1,66 @@ +Conditional Automated Request Shuffler +Initial Design. 9 Nov 99 + +#Try to find out what queue the incoming ticket is in +#Try to find out the default action for this invocation +#Read the ticket from STDIN +#Obtain the actor +#Obtain the serial # if we have one +#If the ticket has a ticket-id + #if this is a 'comment' + #add the current mime objects as a 'comment' + + #if this is 'correspondence' + #add the current mime object as 'correspondence' + + +#if this ticket does not yet have a ticket id + + #For now: + #Create a new ticket + + #In the distant future + + #load the regexp table matching this queue + #check the message agains the regexp table, ordered by precedence + #when we get a match + #get the ruleset for that regexp from the actions table + #evaluate the ruleset in order of precedence. + #if we get an 'exit' stop proccesing ALL rulesets +wpw #if we get a 'forward,' forward it to 'value'. + + #if we get a 'create,' create a request in 'value' + #elseif we get a 'map', add this as additional correspondence on ticket 'value' + + + #if we get an 'associate', associate the ticket number returned from the + 'create' or 'map' with the master ticket from 'value' + + #if we get a 'reply', + #load the reply template with id 'value' + #replace strings in the template + #send the template + + + + +CREATE TABLE Rules { +ID int AUTO_INCREMENT, +Desc varchar(120), +Regexp varchar(80), +Precedence int, +MatchField varchar(20), #Can be a headername or 'any' all header names + #end in : + + +CREATE TABLE Actions { +Rule int, +Action varchar(20), # Create, Forward, Squelch, Owner, Area, Associate +Value varchar(20), #queue or email address +Desc varchar(120) +} + +CREATE TABLE Autoreplies { +ID int AUTO_INCREMENT, +Content text +); \ No newline at end of file diff --git a/rt/docs/design_docs/TransactionTypes.txt b/rt/docs/design_docs/TransactionTypes.txt new file mode 100755 index 000000000..942b72371 --- /dev/null +++ b/rt/docs/design_docs/TransactionTypes.txt @@ -0,0 +1,48 @@ +This is some loose scrabbling made by TobiX, they might eventually be relevant +for 2.1. + +INTERFACES, in general + +should: + +- provide the user (client?) with a list of possible actions (methods). +- let the user execute those actions (methods). +- Return information to the user/client. + +There are two kind of actions/methods: + +- Information retrieval +- Transactions + +For the first, I think the best thing is to just provide a lot of +methods for it in the libraries, and let it be an Interface Design +Issue what to show and how to show it. + +For the second, I think we can win in the long run on having a +generalized methods for + +- listing transaction types. +- creating & committing transactions. + +..with the possibility of just deploying new custom-developed modules +when new transaction types are needed. + + +$RT::TransactionTypes ...and... +%RT::TransactionTypes + - global object which contains all TransactionTypes + - used by all UIs to create menues of possible (user) actions (one TransactionType is a user action) + +The UIs should call sth like +$Ticket->AddTransaction($TransactionName), which should be equivalent +with i.e. $Ticket->Correspond when $TransactionName is 'Correspond' +(AUTOLOAD should call the do-sub if exists +$RT::TransactionTypes{$TransactionName}) + +The RT::Ticket::AddTransaction will create a new transaction of the +right TransactionClass (maybe via a sub +RT::TransactionTypes::NewTransaction). Then $Transaction->do is +called. + +TransactionType->do initializes a new object of the right TransactionClass, and + diff --git a/rt/docs/design_docs/acls b/rt/docs/design_docs/acls new file mode 100644 index 000000000..3b9d8567c --- /dev/null +++ b/rt/docs/design_docs/acls @@ -0,0 +1,206 @@ +$Header: /home/cvs/cvsroot/freeside/rt/docs/design_docs/acls,v 1.1 2002-08-12 06:17:07 ivan Exp $ + + + +# {{{ Requirements + +Here's the rough scheme I was thinking of for RT2 acls. Thoughts? I think +it's a lot more flexible than RT 1.0, but not so crazily complex that +it will be impossible to implement. One of the "interesting" features +is the ability to grant acls based on watcher status. This now lives +in design-docs/acls + + jesse + +Who can rights be granted to: + + users whose id is + users who are watchers of type for + users who are watchers of type for + + +what scope do these rights apply to + queue + system + + +What rights can be granted + Display Ticket + Manipulate Ticket + Only users with manipulate ticket level access will see comments + Maniplulate Ticket Status + Create Ticket + + Admin Queue Watchers + Admin Ticket Watchers + Admin user accounts + Admin scrips + Admin scripscopes + Admin Queue ACLS + Admin System ACLs + +# }}} + + +# {{{ Prinicpals These are the entities in your Access Control Element +# + +Principal: What user does this right apply to + + Made up of: + PrincipalScope, PrincipalType and PrincipalId + + + User: + Scope: User + Type: null + Id: A userid or 0 + + Owner: + Scope: Owner + Type: null + Id: none + + + Watchers: + + Scope: Ticket + Type: Requestors; Cc; AdminCc + Id: A ticket id or 0 for "this ticket" + + Scope: Queue + Type: Cc; AdminCc + Id: A queue id or 0 for "this queue" + + +# }}} + +# {{{ Object: What object does this right apply to + + Object is composed of an ObjectType and an ObjectId + + Type: System + Id: NULL + + Type: Queue + Id: Integer ref to queue id or 0 for all queues + +# }}} + +# {{{ Right: (What does this entry give the principal the right to do) + + + + For the Object System: + System::SetACL + System::AdminScrips + + User::Display + User::Create + User::Destroy + User::Modify + User::SetPassword + + + + For the Object "Queue": + Queue::Admin + Queue::SetACL + Queue::Create + Queue::Display + Queue::Destroy + Queue::ModifyWatchers + Ticket::Create + Ticket::Destory + Ticket::Display + Ticket::Update + Ticket::UpdateRequestors + Ticket::UpdateCc + Ticket::UpdateAdminCc + Ticket::NotifyWatchers + + + DEFERRED + + Ticket::SetStatus: (Values) + Open + Resolved + Stalled + means any + + +# }}} + + +# {{{ Implementation: + +# {{{ SQL Schema +CREATE TABLE ACL ( + id int not null primary_key autoincrement, + PrinicpalId INT(11), + PrincipalType VARCHAR(16), + PrincipalScope VARCHAR(16), + ObjectType VARCHAR(16), + ObjectId INT, + Right VARCHAR(16) +); + +# }}} + +# {{{ perl implementation of rights searches + +sub Principals { +if (defined $Ticket) { + return "($UserPrincipal) OR ($OwnerPrincipal) OR ($WatchersPrincipal)"; + } +else { + return "($UserPrincipal) OR ($WatchersPrincipal)"; + } +} + +$Principals = " ($UserPrincipal) OR ($OwnerPrincipal) OR ($WatchersPrincipal)"; + +$UserPrincipal = " ( ACE.PrincipalScope = 'User') AND + ( ACE.PrincipalId = $User OR ACE.PrincipalId = 0)"; + +$OwnerPrincipal = " ( ACE.PrinciaplScope = 'Owner') AND + ( Tickets.Owner = "$User ) AND + ( Tickets.Id = $Ticket)"; + +$WatchersPrincipal = " ( ACE.PrincipalScope = Watchers.Scope ) AND + ( ACE.PrincipalType = Watchers.Type ) AND + ( ACL.PrincipalId = Watchers.Value ) AND + ( Watchers.Owner = $User )"; + +$QueueObject = "( ACE.ObjectType = 'Queue' and (ACE.ObjectId = $Queue OR ACE.ObjectId = 0)"; + +$SystemObject = "( ACE.ObjectType = 'System' )"; + + +# This select statement would figure out if A user has $Right at the queue level + +SELECT ACE.id from ACE, Watchers, Tickets WHERE ( + $QueueObject + AND ( ACE.Right = $Right) + AND ($Principals)) + +# This select statement would figure outif a user has $Right for the "System" + +SELECT ACE.id from ACE, Watchers, Tickets WHERE ( + ($SystemObject) AND ( ACE.Right = $Right ) AND ($Principals)) + +# }}} + +# }}} + +# {{{ Examples +# + +# }}} + + + +Unaddressed issues: + + There needs to be a more refined method for grouping users, such that members of the customer service department +can't change sysadmins' passwords. diff --git a/rt/docs/design_docs/basic-definitions.txt b/rt/docs/design_docs/basic-definitions.txt new file mode 100644 index 000000000..23d2c5748 --- /dev/null +++ b/rt/docs/design_docs/basic-definitions.txt @@ -0,0 +1,54 @@ +(todo ... basically, those are untouched from 1.0) +Ticket +Queue +(...more?) + +Requestor + + (...definition of a requestor .. blahblah) + + I'm often doing a distinction between "Internal Requestors" and "External + Requestors" (see below). The system doesn't make any difference between + requestors, but the distinction might be useful to discuss usage patterns, + templates and configurations. + + +External Requestor + + Might be a customer or a potential customer. The External Requestor + should be treated as a VIP. (S)he shouldn't need to see too much of RT. + The support (s)he gets should be as personal as possible. The external + requestor might eventually get access to the Web UI, but only to track + her/his own requests. If you're not planning to use RT for handling + external customers, all your requestors are probably "Internal + Requestors". + + +Watcher + + Somebody that are "subscribing" to a queue or a ticket (or something + differently). Basicly, somebody watching a queue or a ticket should get + all updates by email. A requestor is a (special) watcher. + + +Regular Watcher + + People within the same organization, people that have read access to whole + queues. + + I consider "Regular Watchers" as well as "Internal Requestors" as more + robust and capable human beeings than the fragile customers. We don't + mind letting them get entagled with RT, and we let them access the Web UI. + They can live with beeing just the Cc or Bcc at an email. + + +Internal Requestor + + An Internal Requestor is usually internal to the company. He might be 1st + line support sending matters to tech support or similar. Might be an + internal employee sending matters to tech support (or even 1st line + support if he's not sure where to send matters). It might also be that + "ordinary" requestors actually might be treated as intelligent human + beeings rather than VIPs, i.e. in open source projects ... we'll still + call them "Internal Requestors" as they don't need the special VIP + treatment. diff --git a/rt/docs/design_docs/cli_spec b/rt/docs/design_docs/cli_spec new file mode 100644 index 000000000..48a7f34e1 --- /dev/null +++ b/rt/docs/design_docs/cli_spec @@ -0,0 +1,354 @@ + +Find tickets to operate on: + --id= Find only tickets in the range + synonyms: + --limit-id, --tickets, --limit-tickets + --limit-queue= + --limit-status= + --limit-owner= + --limit-priority= + --limit-requestor= + --limit-subject= (Subject contains) + --limit-body= (body contains) + --limit-created=(before/after) + --limit-due=(before/after) + --limit-starts=(before/after) + --limit-started=(before/after) + + --limit-first= Start on the th row returned by the + database + --limit-rows= Find only rows + +Display: + --show shows a ticket history + --history ditto + + --summary default option. shows a ticket summary + --format Optional format string. If not specified, + uses the value of ENV{'RT_LISTING_FORMAT'} + or an internal default + + +Basic ticket editing: + + --status=(open|stall|resolve|kill) + --subject= + --owner= + --queue= + --time-left= + +Watcher-related editing: + + --add-requestor= + --del-requestor= + --add-cc= + --del-cc= + --add-admincc= + --del-admincc= + +Priority related editing: + + --priority= + --final-priority= + +Date related editing: + + --due=date + --starts=date + --started=date + --contacted=date + + + +Ticket updates: + + --comment + --reply | --respond + + +Links + + --add-link + --type= + needs one of: + --target= + --base= + + --del-link + + + +Condiments: + any update can take: + + --time-taken + + Ticket updates can take: + + --source -- specify a source file to read the content from + --edit = give me an editor to edit the message + --no-edit = don't give me an editor to edit the message. + + + + +----- Forwarded message from deborah kaplan ----- + +Date: Fri, 14 Apr 2000 11:43:18 -0400 (EDT) +From: deborah kaplan +To: Jesse +Subject: Re: [rt-devel] RT Projects list + +Finally, here is the functional spec for the command line +interface. This is for the user interface only; if you think +this is right, I will add the administrative interface as well. +Should I post to rt-devel, add to the ticket, or just modify +based on your kibbitzing? When you are happy with it I'll start +the code. + +-deborah + + +RT command line interface functional specification +Author: Deborah Kaplan (Deborah@suberic.net) +Version:0.1 + +Requirements: + +RT needs a CLI for various reasons. If a user is restricted to a +dumb terminal, she needs to be able to access the RT database and +manipulate it fully. The full functionality of both the RT +database and the RT administrative interface should be available +from this CLI. + +There are two possible types of CLI which I will discuss here. +The first is a curses-style interface, which allows the user to +move about a series of menus and choices, usually using arrow +keys. As RT supplies a Web interface, there is no need for this +curses-style interface to be written as part of RT. Instead, the +RT developers should pick one tty-based Web browser (e.g. lynx, +w3m) and make sure that all of the RT pages are easily readable +with that tty based browser. Installation of that browser should +be recommended in the RT installation documentation as a +supported method of accessing RT from a tty. + +The second possible type of CLI is more minimal: a series of +commands which can be run at a UNIX command prompt which provide +full functionality to the RT database and administrative +interface. There are two major benefits to this second type of +CLI. First of all, in order to use this CLI, you need no extra +tools (Web browsers, etc.). All that is required is a UNIX +command line prompt and an installation of RT. Secondly, a user +of RT who has a very specific command to run and who knows the +appropriate CLI commands can accomplish her task much more +quickly with a single command then she could navigating through a +menu based interface. + +In the specification, I will describe the second type of CLI. + +Caveats: + +This specification draws heavily on the structure of formatting +command line options for cvs. RT faces a smaller version of the +same kinds of problems cvs faces: we want to create a very rich +command set without sacrificing ease-of-use. + +I am not wedded to any specific command names if they seem +impractical; I merely am proposing the command names that seem +reasonable to me at this moment. + +Finally, I am finding the functioning of the web UI from RT 1. +If the functionality differs greatly in RT 2, I will need to +modify this specification. + +Specification: + +There are two commands: "rt", which is the primary interface to +the database, and "rtadmin", which is the administrative +interface to the database. + +The format of an rt command is as follows: + + rt + is one of: + + - help + print an overview of the commands which can be run + + - print + with no options, dump to the screen a list of all open + requests in -- the equivalent of "Display Queue" in + the existing Web interface. + + is the name of an RT queue +