Revision 42872
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/preferences/GenericDlgPreferences.java | ||
---|---|---|
57 | 57 |
import org.gvsig.tools.extensionpoint.ExtensionPoint; |
58 | 58 |
import org.gvsig.tools.extensionpoint.ExtensionPoint.Extension; |
59 | 59 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
60 |
import org.gvsig.tools.identitymanagement.SimpleIdentityManager; |
|
61 |
import org.gvsig.tools.identitymanagement.UnauthorizedException; |
|
60 | 62 |
import org.slf4j.Logger; |
61 | 63 |
import org.slf4j.LoggerFactory; |
62 | 64 |
|
... | ... | |
357 | 359 |
if (preferences.containsKey(page.getID())) { |
358 | 360 |
return; |
359 | 361 |
} |
360 |
preferences.put(page.getID(), page); |
|
362 |
|
|
363 |
SimpleIdentityManager identityManager = ToolsLocator.getIdentityManager(); |
|
364 |
if( ! identityManager.getCurrentIdentity().isAuthorized(IPreference.ACCESS_PREFERENCES_PAGE_AUTHORIZATION, page, page.getID()) ) { |
|
365 |
// throw new UnauthorizedException(IPreference.ACCESS_PREFERENCES_PAGE_AUTHORIZATION, page, page.getID()); |
|
366 |
return; |
|
367 |
} |
|
368 |
preferences.put(page.getID(), page); |
|
361 | 369 |
page.initializeValues(); // init values from the last settings |
362 | 370 |
if (dirtyTree) { |
363 | 371 |
// rebuild page tree |
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/preferences/IPreference.java | ||
---|---|---|
38 | 38 |
*/ |
39 | 39 |
public interface IPreference extends ExtensionBuilder { |
40 | 40 |
|
41 |
public static final String ACCESS_PREFERENCES_PAGE_AUTHORIZATION = "property-page-access"; |
|
42 |
|
|
41 | 43 |
/** |
42 | 44 |
* Returns an identifier for this preferences page that is used to reference |
43 | 45 |
* it inside the Map. |
Also available in: Unified diff