[Rt-devel] Proposed change to RT::Principal::HasRight
Ruslan Zakirov
ruslan.zakirov at gmail.com
Tue Oct 11 17:04:26 EDT 2005
On 10/12/05, Todd Chapman <todd at chaka.net> wrote:
> On Wed, Oct 12, 2005 at 12:46:24AM +0400, Ruslan Zakirov wrote:
> > On 10/12/05, Todd Chapman <todd at chaka.net> wrote:
> > > Principal::HasRight will return true regardless of the user
> > > has been granted the right directly (ACLEquivalence), as
> > > part of a group (UserDefined), or as part of a few
> > > other group Domains.
> > >
> > > I would like to be able to ask RT if a user has the right
> > > directly or as being part of a group.
> > >
> > > It's a simple patch to give HasRight a Domain list reference
> > > option that default to the currently implemented functionality.
> > >
> > > Is there a better way to do this or should I write, test, and
> > > submit a patch?
> > Very bad idea, this sub is perfomance bottleneck and must be
> > simplified instead of adding new functionality into it. You can scan
> > groups for rights or do whatever magic you want, but don't touch this
> > unless it has real bugs.
>
> I don't think you understand what I am proposing. If HasRight is changed
> as suggested it will run the same if the new option is default. If the
> new option is specified, the query will be smaller and faster.
Heh, really didn't understand you right.
>
> -Todd
> _______________________________________________
> Rt-devel mailing list
> Rt-devel at lists.bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>
--
Best regards, Ruslan.
More information about the Rt-devel
mailing list