Skip to content

Commit 9d757ca

Browse files
committed
Remove all the ACL and Auth stuff for now
1 parent a4cfe19 commit 9d757ca

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

lib/RDF/LinkedData.pm

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,6 @@ sub _build_model {
162162
return $self->_load_model($self->store);
163163
}
164164

165-
has acl_model => (is => 'ro', isa => 'RDF::Trine::Model', lazy => 1, builder => '_build_acl_model',
166-
handles => { acl_etag => 'etag' });
167-
168-
sub _build_acl_model {
169-
my $self = shift;
170-
return $self->_load_model($self->acl_config->{store});
171-
}
172-
173-
174165
sub _load_model {
175166
my ($self, $store_config) = @_;
176167
# First, set the base if none is configured
@@ -204,8 +195,6 @@ has endpoint_config => (is => 'rw', traits => [ qw(MooseX::UndefTolerant::Attrib
204195
has void_config => (is => 'rw', traits => [ qw(MooseX::UndefTolerant::Attribute)],
205196
isa=>'HashRef', predicate => 'has_void_config');
206197

207-
has acl_config => (is => 'rw', traits => [ qw(MooseX::UndefTolerant::Attribute)],
208-
isa=>'HashRef', predicate => 'has_acl_config');
209198

210199

211200
=item C<< request ( [ $request ] ) >>
@@ -429,37 +418,6 @@ sub count {
429418
return $self->model->count_statements( $node, undef, undef );
430419
}
431420

432-
#has webid => (is => 'ro', isa => 'Web::Id', predicate => 'has_webid', clearer => 'clear_webid');
433-
434-
has auth_uri => (
435-
is => 'rw',
436-
isa => 'Str',
437-
predicate => 'has_auth_uri',
438-
clearer => 'clear_auth_uri'
439-
);
440-
441-
has auth_level => (
442-
is => 'rw',
443-
traits => ['Array'],
444-
isa => 'ArrayRef[Str]',
445-
default => sub { ['http://www.w3.org/ns/auth/acl#Read'] },
446-
handles => {
447-
all_auth_levels => 'uniq',
448-
add_auth_levels => 'push',
449-
has_no_auth_levels => 'is_empty',
450-
},
451-
clearer => 'clear_auth_level'
452-
);
453-
454-
sub has_auth_level { # Clearly, my Moose-fu is inadequate, just hack it for now.
455-
my ($self, $level) = @_;
456-
return 1 if scalar(grep(/\#$level$/i, $self->all_auth_levels));
457-
if (lc($level) eq 'append') { # Special case, surely write entails append?
458-
return 1 if scalar(grep(/\#Write$/, $self->all_auth_levels));
459-
}
460-
return 0;
461-
}
462-
463421

464422
# =item C<< _content ( $node, $type, $endpoint_path) >>
465423
#
@@ -511,22 +469,6 @@ sub _content {
511469
}
512470
}
513471
}
514-
my $hmns = RDF::Trine::Namespace->new('http://example.org/hypermedia#');
515-
if ($self->has_auth_level('write')) {
516-
$hmmodel->add_statement(statement($data_iri,
517-
$hmns->canBe,
518-
$hmns->replaced));
519-
$hmmodel->add_statement(statement($data_iri,
520-
$hmns->canBe,
521-
$hmns->deleted));
522-
}
523-
if ($self->has_auth_level('append')) {
524-
$hmmodel->add_statement(statement($data_iri,
525-
$hmns->canBe,
526-
$hmns->mergedInto));
527-
}
528-
529-
530472
$iter = $iter->concat($hmmodel->as_stream);
531473
}
532474
$output{body} = $s->serialize_iterator_to_string ( $iter );

0 commit comments

Comments
 (0)