[Rt-commit] rtfm branch, master, updated. 02d245d19811961239f7a52bb339857bb72ec9ee
Kevin Falcone
falcone at bestpractical.com
Thu Sep 30 17:35:40 EDT 2010
The branch, master has been updated
via 02d245d19811961239f7a52bb339857bb72ec9ee (commit)
via a80d1de4462cc824d795af0a8ac8971269acbdda (commit)
via 3c6cb701c68578fdfc272af5c9f5f565011dea2d (commit)
from 548c9077db2ba1ec85f1449ae1f4c5ac2049b84e (commit)
Summary of changes:
etc/initial_data/dyndns | 40 ----------------------------------------
lib/RT/FM/System.pm | 20 ++++++++++++++++----
2 files changed, 16 insertions(+), 44 deletions(-)
delete mode 100644 etc/initial_data/dyndns
- Log -----------------------------------------------------------------
commit 3c6cb701c68578fdfc272af5c9f5f565011dea2d
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Sep 24 12:11:12 2010 -0400
Remove old cruft
diff --git a/etc/initial_data/dyndns b/etc/initial_data/dyndns
deleted file mode 100644
index a655217..0000000
--- a/etc/initial_data/dyndns
+++ /dev/null
@@ -1,40 +0,0 @@
- at Classes = (
- { Name => 'FAQs' },
- { Name => 'Knowledge Base' }
-
-);
-
- at CustomFields = (
- { Name => 'Service',
- Type => 'SelectMultiple',
- Classes => ['FAQs'],
- Values => [
-
- { Name => 'Custom DNS', },
- { Name => 'Secondary DNS', },
- { Name => 'MyWebHop', },
- { Name => 'Dynamic DNS', },
- { Name => 'Static DNS', },
- { Name => 'WebHop', },
- { Name => 'Uncategorized', }, ] },
- { Name => 'Category',
- Type => 'SelectSingle',
- Classes => ['FAQs', 'Knowledge Base'],
- Values => [ { Name => 'DNS', },
- { Name => 'Email', },
- { Name => 'Webserver', },
- { Name => 'Accounts', },
- { Name => 'Clients', },
- { Name => 'Third-party Applications', },
- { Name => 'General', } ] },
- { Name => 'Content',
- Type => 'TextSingle',
- Classes => ['FAQs', 'Knowledge Base']}
-
-);
-
- at Users = (
- { Name => 'RTFM Guest',
- Privileged => '0',
- }
-);
commit a80d1de4462cc824d795af0a8ac8971269acbdda
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Thu Sep 30 14:35:56 2010 -0700
Start including global rights
diff --git a/lib/RT/FM/System.pm b/lib/RT/FM/System.pm
index d33d5c4..9ac3019 100644
--- a/lib/RT/FM/System.pm
+++ b/lib/RT/FM/System.pm
@@ -99,7 +99,7 @@ sub AvailableRights {
my $classrights = $class->AvailableRights();
my $CustomField = RT::CustomField->new($RT::SystemUser);
my $cfrights = $CustomField->AvailableRights();
- my %rights = (%{$cfrights}, %{$classrights});
+ my %rights = (%{$RIGHTS}, %{$cfrights}, %{$classrights});
return(\%rights);
}
commit 02d245d19811961239f7a52bb339857bb72ec9ee
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Thu Sep 30 14:36:10 2010 -0700
Steal some code from RT::System
Make it cleaner to add rights from an extension
diff --git a/lib/RT/FM/System.pm b/lib/RT/FM/System.pm
index 9ac3019..00fefdb 100644
--- a/lib/RT/FM/System.pm
+++ b/lib/RT/FM/System.pm
@@ -82,10 +82,22 @@ $RIGHTS = {
};
-foreach my $right ( keys %{$RIGHTS} ) {
- $RT::ACE::LOWERCASERIGHTNAMES{ lc $right } = $right;
-}
+__PACKAGE__->AddRights(%$RIGHTS);
+
+=head2 AddRights C<RIGHT>, C<DESCRIPTION> [, ...]
+
+Adds the given rights to the list of possible rights. This method
+should be called during server startup, not at runtime.
+=cut
+
+sub AddRights {
+ my $self = shift if ref $_[0] or $_[0] eq __PACKAGE__;
+ my %new = @_;
+ $RIGHTS = { %$RIGHTS, %new };
+ %RT::ACE::LOWERCASERIGHTNAMES = ( %RT::ACE::LOWERCASERIGHTNAMES,
+ map { lc($_) => $_ } keys %new);
+}
=head2 AvailableRights
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list