Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

public to private site permission simple fix #13

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
n.id as id,
n.uuid as uuid,
n.version as version,
n.type_qname_id as type_qname_id,
n.store_id as store_id,
#{storeProtocol} as protocol,
#{storeIdentifier} as identifier,
Expand Down Expand Up @@ -98,6 +99,7 @@
n.id as id,
n.uuid as uuid,
n.version as version,
n.type_qname_id as type_qname_id,
n.store_id as store_id,
#{storeProtocol} as protocol,
#{storeIdentifier} as identifier,
Expand Down Expand Up @@ -174,6 +176,7 @@
node.id as id,
node.uuid as uuid,
node.version as version,
node.type_qname_id as type_qname_id,
node.store_id as store_id,
#{storeProtocol} as protocol,
#{storeIdentifier} as identifier,
Expand All @@ -187,8 +190,9 @@
left outer join alf_namespace ns on qname.ns_id = ns.id

join alf_node_properties np on np.node_id=node.id
join alf_qname qnp on qnp.id=np.qname_id and qnp.local_name='name'
join alf_qname qnp on qnp.id=np.qname_id and qnp.local_name in ('name','originalId')
where
node.store_id = #{storeId} and
node.uuid = #{uuid}
</select>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ indexer.properties.url.prefix = node/details

#Used in NodeDetailsWebScripts
indexer.document.url.prefix = slingshot/node
indexer.share.url = http://${share.host}:${share.port}${share.context}
indexer.share.url = http://${share.host}:${share.port}/${share.context}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also share.context=/share needs to be changed to share.context=share


indexer.changes.nodesperacl=1000
indexer.changes.nodespertxn=1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public class NodeDetailsWebScript extends DeclarativeWebScript {

protected static final Log logger = LogFactory.getLog(NodeDetailsWebScript.class);
protected static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
private static final String BASE_READ_PERMISSIONS = "ReadPermissions";

@Override
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache) {
Expand Down Expand Up @@ -120,7 +121,7 @@ protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, C
for (Acl acl : acls) {
List<AccessControlEntry> aces = aclDao.getAccessControlList(acl.getId()).getEntries();
for (AccessControlEntry ace : aces) {
if (ace.getAccessStatus().equals(AccessStatus.ALLOWED)) {
if ((!ace.getPermission().getName().equals(BASE_READ_PERMISSIONS)) && ace.getAccessStatus().equals(AccessStatus.ALLOWED)) {
if (!readableAuthorities.contains(ace.getAuthority())) {
readableAuthorities.add(ace.getAuthority());
}
Expand Down