Index: trunk/extensions/Wikidata/App.php |
— | — | @@ -96,14 +96,20 @@ |
97 | 97 | $wgAvailableRights[] = 'wikidata-copy'; |
98 | 98 | $wgAvailableRights[] = 'languagenames'; |
99 | 99 | $wgAvailableRights[] = 'addcollection'; |
| 100 | +$wgAvailableRights[] = 'editClassAttributes'; |
100 | 101 | $wgAvailableRights[] = 'exporttsv'; |
101 | 102 | $wgAvailableRights[] = 'importtsv'; |
| 103 | + |
| 104 | +$wgGroupPermissions['*']['editClassAttributes'] = false; |
| 105 | + |
102 | 106 | $wgGroupPermissions['wikidata-omega']['editwikidata-uw'] = true; |
103 | 107 | $wgGroupPermissions['wikidata-omega']['deletewikidata-uw'] = true; |
104 | 108 | $wgGroupPermissions['wikidata-copy']['wikidata-copy'] = true; |
105 | 109 | $wgGroupPermissions['wikidata-omega']['wikidata-copy'] = true; |
| 110 | + |
106 | 111 | $wgGroupPermissions['bureaucrat']['languagenames'] = true; |
107 | 112 | $wgGroupPermissions['bureaucrat']['addcollection'] = true; |
| 113 | +$wgGroupPermissions['bureaucrat']['editClassAttributes'] = true; |
108 | 114 | $wgGroupPermissions['bureaucrat']['exporttsv'] = true; |
109 | 115 | $wgGroupPermissions['bureaucrat']['importtsv'] = true; |
110 | 116 | |
— | — | @@ -150,13 +156,6 @@ |
151 | 157 | $wgDefinedMeaningPageTitlePrefix = ''; |
152 | 158 | $wgExpressionPageTitlePrefix = 'Multiple meanings'; |
153 | 159 | |
154 | | -// Hacks? |
155 | | -$wgDefaultGoPrefix = 'Expression:'; |
156 | | -$wgDefaultClassMids = array( 402295 ); |
157 | | - |
158 | | -require_once( $dir . 'OmegaWiki/GotoSourceTemplate.php' ); |
159 | | -$wgGotoSourceTemplates = array( 5 => $swissProtGotoSourceTemplate ); |
160 | | - |
161 | 160 | # The site prefix allows us to have multiple sets of customized |
162 | 161 | # messages (for different, typically site-specific UIs) |
163 | 162 | # in a single database. |
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php |
— | — | @@ -809,13 +809,12 @@ |
810 | 810 | function getDefinedMeaningEditor( ViewInformation $viewInformation ) { |
811 | 811 | global |
812 | 812 | $wdDefinedMeaningAttributesOrder, $definedMeaningMeaningName, |
813 | | - $relationMeaningName; |
| 813 | + $relationMeaningName, $wgUser; |
814 | 814 | |
815 | 815 | $o = OmegaWikiAttributes::getInstance(); |
816 | 816 | |
817 | 817 | $definitionEditor = getDefinitionEditor( $viewInformation ); |
818 | 818 | $alternativeDefinitionsEditor = getAlternativeDefinitionsEditor( $viewInformation ); |
819 | | - $classAttributesEditor = getClassAttributesEditor( $viewInformation ); |
820 | 819 | $synonymsAndTranslationsEditor = getSynonymsAndTranslationsEditor( $viewInformation ); |
821 | 820 | $reciprocalRelationsEditor = getDefinedMeaningReciprocalRelationsEditor( $viewInformation ); |
822 | 821 | $classMembershipEditor = getDefinedMeaningClassMembershipEditor( $viewInformation ); |
— | — | @@ -824,7 +823,12 @@ |
825 | 824 | $availableEditors = new AttributeEditorMap(); |
826 | 825 | $availableEditors->addEditor( $definitionEditor ); |
827 | 826 | $availableEditors->addEditor( $alternativeDefinitionsEditor ); |
828 | | - $availableEditors->addEditor( $classAttributesEditor ); |
| 827 | + |
| 828 | + if ( $wgUser->isAllowed( 'editClassAttributes' ) ) { |
| 829 | + $classAttributesEditor = getClassAttributesEditor( $viewInformation ); |
| 830 | + $availableEditors->addEditor( $classAttributesEditor ); |
| 831 | + } |
| 832 | + |
829 | 833 | $availableEditors->addEditor( $synonymsAndTranslationsEditor ); |
830 | 834 | $availableEditors->addEditor( $reciprocalRelationsEditor ); |
831 | 835 | $availableEditors->addEditor( $classMembershipEditor ); |