Old versions of attachments

How can we disable to install old versions of attachments in file lists? I want them reachable only by the creator of the space.

2 answers

Hi Zeynep,

Could you pelase clarify your question so we can better assist you?

What you need to disable?

What you mean by old version of attachments file lists?

0 vote
Davin Studer Community Champion Jun 08, 2014

If you want it to show for certain people you could add JavaScript into the custom html section in Confluence to conditionally set some CSS to hide the link to expand the file list. Granted that if someone wanted to go thorugh the page source they could still see it, but your average user wouldn't know how to do that. The CSS you would need is ...

.attachment-history {display: none;}

Here is some JS code that could do the trick.

AJS.toInit(function(){
	var user;

	switch(AJS.Meta.get("space-key"))
	{
		case "DEV":
			user = "jdoe";
			break;
		case "HR":
			user = "jschmoe";
			break;
		case "DOC":
			user = "bgates";
			break;
	}

	hideHistoryIfNot(user);
});

function hideHistoryIfNot(user) {
	if(AJS.Meta.get("remote-user") !== user) {
		AJS.$(".attachment-history").css("display", "none");
	}
}

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

785 views 23 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you