]> git.argeo.org Git - lgpl/argeo-commons.git/blob - NonAdminPage.java
cb38ce89925044f142ae8b2b2ce52f208826913c
[lgpl/argeo-commons.git] / NonAdminPage.java
1 package org.argeo.cms.e4.maintenance;
2
3 import javax.jcr.Node;
4 import javax.jcr.RepositoryException;
5
6 import org.argeo.cms.swt.CmsSwtUtils;
7 import org.argeo.cms.ui.CmsUiProvider;
8 import org.eclipse.swt.SWT;
9 import org.eclipse.swt.layout.GridData;
10 import org.eclipse.swt.layout.GridLayout;
11 import org.eclipse.swt.widgets.Composite;
12 import org.eclipse.swt.widgets.Control;
13 import org.eclipse.swt.widgets.Label;
14
15 public class NonAdminPage implements CmsUiProvider{
16
17 @Override
18 public Control createUi(Composite parent, Node context)
19 throws RepositoryException {
20 Composite body = new Composite(parent, SWT.NO_FOCUS);
21 body.setLayoutData(CmsSwtUtils.fillAll());
22 body.setLayout(new GridLayout());
23 Label label = new Label(body, SWT.NONE);
24 label.setText("You should be an admin to perform maintenance operations. "
25 + "Are you sure you are logged in?");
26 label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true));
27 return null;
28 }
29
30 }