Repository: syncope Updated Branches: refs/heads/master 764fa2eca -> 714557e64
http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/META-INF/resources/app/views/editUser.html ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/editUser.html b/client/enduser/src/main/resources/META-INF/resources/app/views/editUser.html new file mode 100644 index 0000000..9361cdf --- /dev/null +++ b/client/enduser/src/main/resources/META-INF/resources/app/views/editUser.html @@ -0,0 +1,73 @@ +<!DOCTYPE html> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<div ng-cloak class="container"> + <div class="login-container" ng-controller="UserController" ng-init="initUser();" style="box-sizing: border-box; "> + + <div id="form-container" class="col-md-6 col-md-offset-3"> + + + <div> + <div class="page-header" style="text-align: left; font-weight: 700;"> + <span ng-show="createMode">New User</span> + <span ng-show="!createMode">User {{user.username}}</span> + </div> + <div class="breadcrumb-header text-center"> + + <!-- the links to our nested states using relative paths --> + <!-- add the active class if the state matches our ui-sref --> + <!--<div id="status-buttons" class="text-center">--> + <div class="row"> + <div growl reference="2" inline="true"></div> + <div id="status-buttons" class="btn-group btn-breadcrumb"> + <a href="#/self" class="btn btn-default"><i class="glyphicon glyphicon-home"></i></a> + <!--add class breadcrumb-disabled-link to buttons to prevent click--> + <a ui-sref-active="active" ui-sref=".credentials" class="btn btn-default">Credentials</a> + <a ui-sref-active="active" ui-sref=".plainSchemas" class="btn btn-default">Plain Schemas</a> + <a ui-sref-active="active" ui-sref=".derivedSchemas" class="btn btn-default">Derived Schemas</a> + <a ui-sref-active="active" ui-sref=".virtualSchemas" class="btn btn-default">Virtual Schemas</a> + <a ui-sref-active="active" ui-sref=".groups" class="btn btn-default">Groups</a> + <a ui-sref-active="active" ui-sref=".resources" class="btn btn-default">Resources</a> + </div> + </div> + </div> + <form class="signup-form" name="userForm" ng-submit="saveUser(user)" novalidate> + + <div id="form-views" ui-view> + + <!-- <div class="form-group row"> + <div class="col-xs-6 col-xs-offset-3"> + <a id="next" ui-sref="create.credentials" class="btn btn-block btn-signin"> + Start <span class="glyphicon glyphicon-circle-arrow-right"></span> + </a> + <a id="cancel" href="#/self" class="btn btn-link">Cancel</a> + </div> + </div>--> + + </div> + <!-- <div class="form-actions"> + <button type="submit" ng-disabled="form.$invalid || vm.dataLoading" class="btn btn-primary" ng-click="saveUser()">Register</button> + <img ng-if="vm.dataLoading" src="data:image/gif;base64,R0lGODlhEAAQAPIAAP///wAAAMLCwkJCQgAAAGJiYoKCgpKSkiH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAADMwi63P4wyklrE2MIOggZnAdOmGYJRbExwroUmcG2LmDEwnHQLVsYOd2mBzkYDAdKa+dIAAAh+QQJCgAAACwAAAAAEAAQAAADNAi63P5OjCEgG4QMu7DmikRxQlFUYDEZIGBMRVsaqHwctXXf7WEYB4Ag1xjihkMZsiUkKhIAIfkECQoAAAAsAAAAABAAEAAAAzYIujIjK8pByJDMlFYvBoVjHA70GU7xSUJhmKtwHPAKzLO9HMaoKwJZ7Rf8AYPDDzKpZBqfvwQAIfkECQoAAAAsAAAAABAAEAAAAzMIumIlK8oyhpHsnFZfhYumCYUhDAQxRIdhHBGqRoKw0R8DYlJd8z0fMDgsGo/IpHI5TAAAIfkECQoAAAAsAAAAABAAEAAAAzIIunInK0rnZBTwGPNMgQwmdsNgXGJUlIWEuR5oWUIpz8pAEAMe6TwfwyYsGo/IpFKSAAAh+QQJCgAAACwAAAAAEAAQAAADMwi6IMKQORfjdOe82p4wGccc4CEuQradylesojEMBgsUc2G7sDX3lQGBMLAJibufbSlKAAAh+QQJCgAAACwAAAAAEAAQAAADMgi63P7wCRHZnFVdmgHu2nFwlWCI3WGc3TSWhUFGxTAUkGCbtgENBMJAEJsxgMLWzpEAACH5BAkKAAAALAAAAAAQABAAAAMyCLrc/jDKSatlQtScKdceCAjDII7HcQ4EMTCpyrCuUBjCYRgHVtqlAiB1YhiCnlsRkAAAOwAAAAAAAAAAAA==" /> + <a href="#/self" class="btn btn-link">Cancel</a> + </div>--> + </form> + </div> + </div> + </div> +</div> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/META-INF/resources/app/views/generic-error.html ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/generic-error.html b/client/enduser/src/main/resources/META-INF/resources/app/views/generic-error.html new file mode 100644 index 0000000..2ca6c58 --- /dev/null +++ b/client/enduser/src/main/resources/META-INF/resources/app/views/generic-error.html @@ -0,0 +1,24 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<html> + <body> + <div>PAGE NOT FOUND</div> + </body> +</html> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/META-INF/resources/app/views/home.html ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/home.html b/client/enduser/src/main/resources/META-INF/resources/app/views/home.html new file mode 100644 index 0000000..ca365ff --- /dev/null +++ b/client/enduser/src/main/resources/META-INF/resources/app/views/home.html @@ -0,0 +1,34 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<html> + <body> + <div>TITLE GET FROM CONTROLLER:</div> + <p>{{title}}</p> + <p>{{subtitle}}</p> + <p>{{name}}</p> + + <button type="button" ng-click="">Password Reset</button> + <button type="button" ng-click="">Self Registration</button> + <button type="button" ng-click="">Self Update</button> + <button type="button" ng-click="sampleAPI()">Sample</button> + <button type="button" ng-click="errorAPI()">Error</button> + + </body> +</html> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/META-INF/resources/app/views/navigationButtons.html ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/navigationButtons.html b/client/enduser/src/main/resources/META-INF/resources/app/views/navigationButtons.html new file mode 100644 index 0000000..793334d --- /dev/null +++ b/client/enduser/src/main/resources/META-INF/resources/app/views/navigationButtons.html @@ -0,0 +1,8 @@ +<div class="col-xs-6 col-xs-offset-3"> + <a ng-show="next !== 'none'" id="next" ui-sref="{{next}}" class="btn btn-default"> + Next <span class="glyphicon glyphicon-circle-arrow-right"></span> + </a> + <a ng-show="previous !== 'none'" id="previous" ui-sref="{{previous}}" class="btn btn-default"> + <span class="glyphicon glyphicon-circle-arrow-left"></span> Previous + </a> +</div> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/META-INF/resources/app/views/self.html ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/self.html b/client/enduser/src/main/resources/META-INF/resources/app/views/self.html new file mode 100644 index 0000000..0139697 --- /dev/null +++ b/client/enduser/src/main/resources/META-INF/resources/app/views/self.html @@ -0,0 +1,131 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="X-UA-Compatible" content="IE=edge"/> + <meta charset="UTF-8"/> + <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'/> + + <title>Apache Syncope Enduser - Login</title> + </head> + + <body> + + <div ng-cloak class="container"> + + <div id="login-container" ng-controller="LoginController" style="box-sizing: border-box; "> + + <!-- <div id="logo"> + <a href="/"> + <img class="login-logo" src="img/logo-green.png" /> + </a> + </div>--> + <div id="login"> + <div class="logout"> + <a href="javascript:void(0);" class="btn btn-danger btn-signin" ng-click="logout()" ng-show="isLogged()" title="Logout"> + <i class="glyphicon glyphicon-off"></i> + </a> + </div> + <div> + <div id="language" class="form-group" ng-controller="LanguageController" ng-init="init()"> + <div id="languageContainer" class="col-xs-2"> + + <select class="form-control" ng-options="language.name for language in languages.availableLanguages track by language.id" + ng-model="languages.selectedLanguage" ></select> + + </div> + </div> + + <h3>Welcome to Apache Syncope Enduser</h3> + <h5 ng-show="!isLogged()">please login to self update</h5> + + <div id="login-form" class="form"> + <div growl reference="1" inline="true"></div> + </div> + + <form id="login-form" class="form" novalidate ng-show="!isLogged()" > + + <div class="form-group"> + <input autofocus="autofocus" type="text" class="form-control" id="login-username" placeholder="Username" + ng-required ng-model="credentials.username" placeholder="username"> + </div> + + <div class="form-group"> + <input type="password" class="form-control" id="login-password" placeholder="Password" + ng-required ng-model="credentials.password" placeholder="password"> + </div> + + <div class="form-group"> + + <button type="submit" id="login-btn" class="btn btn-default btn-signin login-btn" ng-click="login(credentials)">Login</button> + <a href="javascript:void(0);" class="btn btn-link" ng-click="selfCreate()">Self Registration</a> + <a href="javascript:void(0);" class="btn btn-link" ng-click="passwordReset()">Password Reset</a> + </div> + </form> + + </div> + + </div> + + </div> + + </div> <!-- /#login --> + + <!-- <div id="initialLoaderDiv"> + <img src="img/busy.gif" class="ajax-loader"/> + </div>--> + </div> <!-- /#login-container --> + + + + + + + + + + + + + + + <!-- <div class="container" ng-cloak ng-controller="LoginController"> + <div class="card card-container"> + <img class="login-logo" src="img/logo-green.png" /> + + <div growl></div> + + <form class="form-signin" novalidate ng-show="!isLogged()"> + <input type="text" id="username" class="form-control" ng-required autofocus="autofocus" ng-model="credentials.username" /> + <input type="password" id="password" class="form-control" required="required" ng-model="credentials.password" /> + + <select id="language" style="width: 100%" + ng-options="language.name for language in languages.availableLanguages track by language.id" + ng-model="languages.selectedLanguage"></select> + + <button type="submit" class="btn btn-lg btn-primary btn-block btn-signin" ng-click="login(credentials)">Login</button> + </form> + + + + </div> + </div>--> + </body> +</html> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html new file mode 100644 index 0000000..cfd1ba6 --- /dev/null +++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html @@ -0,0 +1,60 @@ +<!DOCTYPE html> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<div id="attribute" class="form-group"> + <label for="user.username">Username</label> + <input name="username" type="text" class="form-control" ng-model="user.username" required placeholder="username" > + <p ng-show="(userForm.username.$error.required && !userForm.username.$pristine)" class="text-validation-error">Username is required</p> +</div> + +<div id="attribute" class="form-group"> + <label for="user.password">Password</label> + <input type="password" class="form-control" name="password" ng-model="user.password" equals="{{confirmPassword.value}}" + placeholder="password"> +</div> + +<div id="attribute" class="form-group"> + <label for="confirmPassword">Confirm Password</label> + <input name="confirmPassword" type="password" class="form-control" equals="{{user.password}}" ng-model="confirmPassword.value" + placeholder="confirm password"> + <p ng-show="userForm.confirmPassword.$error.equals" class="text-validation-error">Password and confirm password must be equal</p> +</div> + +<div id="attribute" class="form-group"> + <label for="securityQuestion">Security Question</label> + <select name="securityQuestion" class="form-control" + ng-model="user.securityQuestion" + ng-options="securityQuestion.key as securityQuestion.content for securityQuestion in availableSecurityQuestions"> + <option value="">Select security question</option> + </select> +</div> + +<div id="attribute" class="form-group"> + <label for="securityAnswer">Security Answer</label> + <input ng-disabled="user.securityQuestion === initialSecurityQuestion" name="securityAnswer" type="text" class="form-control" ng-model="user.securityAnswer" + placeholder="security answer"> +</div> + +<div class="form-group row"> + <navigation-buttons ng-show="createMode" next="create.plainSchemas" previous="none"></navigation-buttons> + <navigation-buttons ng-show="!createMode" next="update.plainSchemas" previous="none"></navigation-buttons> + <div class="col-xs-6 col-xs-offset-3"> + <a id="cancel" href="#/self" class="btn btn-danger">Cancel</a> + </div> +</div> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html new file mode 100644 index 0000000..a92b9c2 --- /dev/null +++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html @@ -0,0 +1,37 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<div id="attribute-derived" class="form-group" > + <div> + <dynamic-derived-attributes user="user" form="dynamicForm"></dynamic-derived-attributes> + </div> + <!-- <div style="color:#dd301b" ng-if="attribute.validated == false" class="row-fluid"> + <div class="col-md-5"></div> + <div class="col-md-7">{{attribute.validationMessage| translate }}</div> + </div>--> + <!--</div>--> +</div> + +<div class="form-group row"> + <navigation-buttons ng-show="createMode" next="create.virtualSchemas" previous="create.plainSchemas"></navigation-buttons> + <navigation-buttons ng-show="!createMode" next="update.virtualSchemas" previous="update.plainSchemas"></navigation-buttons> + <div class="col-xs-6 col-xs-offset-3"> + <a id="cancel" href="#/self" class="btn btn-danger">Cancel</a> + </div> +</div> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html new file mode 100644 index 0000000..58475bb --- /dev/null +++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<div class="form-group row upper-select"> + <label>Realm</label> + <select class="form-control" + ng-disabled="true" + ng-model="user.realm" + ng-required="true"> + <option ng-repeat="realm in availableRealms" value="{{realm}}">{{realm}}</option> + </select> +</div> + +<div class="form-group row"> + <navigation-buttons ng-show="createMode" next="create.resources" previous="create.virtualSchemas"></navigation-buttons> + <navigation-buttons ng-show="!createMode" next="update.resources" previous="update.virtualSchemas"></navigation-buttons> + <div class="col-xs-6 col-xs-offset-3"> + <a id="cancel" href="#/self" class="btn btn-danger">Cancel</a> + </div> +</div> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html new file mode 100644 index 0000000..2639197 --- /dev/null +++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html @@ -0,0 +1,37 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<div> + <dynamic-plain-attributes form="dynamicForm" user="user"></dynamic-plain-attributes> +</div> + +<!-- <div style="color:#dd301b" ng-if="attribute.validated == false" class="row-fluid"> + <div class="col-md-5"></div> + <div class="col-md-7">{{attribute.validationMessage| translate }}</div> + </div>--> +<!--</div>--> +<!--</div>--> + +<div class="form-group row"> + <navigation-buttons ng-show="createMode" next="create.derivedSchemas" previous="create.credentials"></navigation-buttons> + <navigation-buttons ng-show="!createMode" next="update.derivedSchemas" previous="update.credentials"></navigation-buttons> + <div class="col-xs-6 col-xs-offset-3"> + <a id="cancel" href="#/self" class="btn btn-danger">Cancel</a> + </div> +</div> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/META-INF/resources/app/views/user-resources.html ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-resources.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-resources.html new file mode 100644 index 0000000..91a99f6 --- /dev/null +++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-resources.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<div class="form-group row"> + <navigation-buttons ng-show="createMode" next="none" previous="create.groups"></navigation-buttons> + <navigation-buttons ng-show="!createMode" next="none" previous="update.groups"></navigation-buttons> + <div class="col-xs-6 col-xs-offset-3"> + <a id="cancel" href="#/self" class="btn btn-danger">Cancel</a> + <button id="save" type="submit" class="btn btn-success">Save</button> + </div> +</div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html new file mode 100644 index 0000000..1d77c80 --- /dev/null +++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html @@ -0,0 +1,37 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<div id="attribute-virtual" class="form-group"> + <div> + <dynamic-virtual-attributes form="dynamicForm" user="user"></dynamic-virtual-attributes> + </div> + <!-- <div style="color:#dd301b" ng-if="attribute.validated == false" class="row-fluid"> + <div class="col-md-5"></div> + <div class="col-md-7">{{attribute.validationMessage| translate }}</div> + </div>--> + <!--</div>--> +</div> + +<div class="form-group row"> + <navigation-buttons ng-show="createMode" next="create.groups" previous="create.derivedSchemas"></navigation-buttons> + <navigation-buttons ng-show="!createMode" next="update.groups" previous="update.derivedSchemas"></navigation-buttons> + <div class="col-xs-6 col-xs-offset-3"> + <a id="cancel" href="#/self" class="btn btn-danger">Cancel</a> + </div> +</div> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/META-INF/web-fragment.xml ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/META-INF/web-fragment.xml b/client/enduser/src/main/resources/META-INF/web-fragment.xml new file mode 100644 index 0000000..b949d4c --- /dev/null +++ b/client/enduser/src/main/resources/META-INF/web-fragment.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<web-fragment xmlns="http://xmlns.jcp.org/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee + http://xmlns.jcp.org/xml/ns/javaee/web-fragment_3_1.xsd" + id="${pom.artifactId}" version="3.1"> + + <!--causes problem if deployed with other fragments--> + <display-name>Apache Syncope ${syncope.version} Enduser</display-name> + +<!-- <context-param> + <param-name>configuration</param-name> + <param-value>deployment</param-value> + </context-param> + + <filter> + <filter-name>SyncopeEnduser</filter-name> + <filter-class>org.apache.wicket.protocol.ws.javax.JavaxWebSocketFilter</filter-class> + <init-param> + <param-name>filterMappingUrlPattern</param-name> + <param-value>/*</param-value> + </init-param> + <init-param> + <param-name>applicationClassName</param-name> + <param-value>org.apache.syncope.client.enduser.SyncopeEnduserApplication</param-value> + </init-param> + </filter>--> + + <filter> + <filter-name>SyncopeEnduser</filter-name> + <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class> + <init-param> + <param-name>applicationClassName</param-name> + <param-value>org.apache.syncope.client.enduser.SyncopeEnduserApplication</param-value> + </init-param> + <init-param> + <param-name>filterMappingUrlPattern</param-name> + <param-value>/*</param-value> + </init-param> + </filter> + + <filter-mapping> + <filter-name>SyncopeEnduser</filter-name> + <url-pattern>/*</url-pattern> + <dispatcher>REQUEST</dispatcher> + <dispatcher>INCLUDE</dispatcher> + </filter-mapping> + + <!--SESSION TIMEOUT (MINUTES)--> + <session-config> + <session-timeout>30</session-timeout> + </session-config> + +</web-fragment> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/enduser.properties ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/enduser.properties b/client/enduser/src/main/resources/enduser.properties new file mode 100644 index 0000000..4dd1cbe --- /dev/null +++ b/client/enduser/src/main/resources/enduser.properties @@ -0,0 +1,30 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +enduser.directory=${conf.directory} +scheme=http +host=localhost +port=8080 +rootPath=/syncope/rest/ + +anonymousUser=${anonymousUser} +anonymousKey=${anonymousKey} + +storePassword=true + +version=${syncope.version} +license=${licenseUrl} + http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/HomePage.html ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/HomePage.html b/client/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/HomePage.html new file mode 100644 index 0000000..55d71a4 --- /dev/null +++ b/client/enduser/src/main/resources/org/apache/syncope/client/enduser/pages/HomePage.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<html> + +</html> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/enduser/src/test/java/org/apache/syncope/client/enduser/SyncopeEnduserApplicationTest.java ---------------------------------------------------------------------- diff --git a/client/enduser/src/test/java/org/apache/syncope/client/enduser/SyncopeEnduserApplicationTest.java b/client/enduser/src/test/java/org/apache/syncope/client/enduser/SyncopeEnduserApplicationTest.java new file mode 100644 index 0000000..4a77739 --- /dev/null +++ b/client/enduser/src/test/java/org/apache/syncope/client/enduser/SyncopeEnduserApplicationTest.java @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.client.enduser; + +import org.apache.syncope.client.enduser.pages.HomePage; +import org.apache.wicket.Session; +import org.apache.wicket.protocol.http.WebSession; +import org.apache.wicket.protocol.http.mock.MockHttpServletResponse; +import org.apache.wicket.request.Request; +import org.apache.wicket.request.Response; +import org.apache.wicket.util.tester.WicketTester; +import org.hamcrest.CoreMatchers; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class SyncopeEnduserApplicationTest { + + private WicketTester tester; + + static class SyncopeEnduserMockSession extends WebSession { + + private static final long serialVersionUID = -2500230416352618497L; + + SyncopeEnduserMockSession(Request request) { + super(request); + } + } + + @Before + public void setUp() { + tester = new WicketTester(new SyncopeEnduserApplication() { + + private static final long serialVersionUID = 1445165406200746511L; + + @Override + public Session newSession(Request request, Response response) { + return new SyncopeEnduserMockSession(request); + } + + }); + } + + @Test + public void testRedirectToIndex() { + tester.setFollowRedirects(false); + tester.startPage(HomePage.class); + tester.assertNoErrorMessage(); + MockHttpServletResponse response = tester.getLastResponse(); + Assert.assertThat(response.getRedirectLocation(), CoreMatchers.equalTo("app/")); + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/client/pom.xml ---------------------------------------------------------------------- diff --git a/client/pom.xml b/client/pom.xml index 68bd1e5..0cefabb 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -60,6 +60,7 @@ under the License. <module>lib</module> <module>console</module> <module>cli</module> + <module>enduser</module> </modules> </project> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java index 6587d1d..f0c2d15 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java @@ -46,22 +46,14 @@ public final class Entitlement { public static final String REALM_DELETE = "REALM_DELETE"; - public static final String ANYTYPECLASS_LIST = "ANYTYPECLASS_LIST"; - public static final String ANYTYPECLASS_CREATE = "ANYTYPECLASS_CREATE"; - public static final String ANYTYPECLASS_READ = "ANYTYPECLASS_READ"; - public static final String ANYTYPECLASS_UPDATE = "ANYTYPECLASS_UPDATE"; public static final String ANYTYPECLASS_DELETE = "ANYTYPECLASS_DELETE"; - public static final String ANYTYPE_LIST = "ANYTYPE_LIST"; - public static final String ANYTYPE_CREATE = "ANYTYPE_CREATE"; - public static final String ANYTYPE_READ = "ANYTYPE_READ"; - public static final String ANYTYPE_UPDATE = "ANYTYPE_UPDATE"; public static final String ANYTYPE_DELETE = "ANYTYPE_DELETE"; @@ -90,8 +82,6 @@ public final class Entitlement { public static final String SCHEMA_CREATE = "SCHEMA_CREATE"; - public static final String SCHEMA_READ = "SCHEMA_READ"; - public static final String SCHEMA_UPDATE = "SCHEMA_UPDATE"; public static final String SCHEMA_DELETE = "SCHEMA_DELETE"; http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/core/logic/src/main/java/org/apache/syncope/core/logic/AnyTypeClassLogic.java ---------------------------------------------------------------------- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/AnyTypeClassLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/AnyTypeClassLogic.java index 1743370..7ccd2bf 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/AnyTypeClassLogic.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/AnyTypeClassLogic.java @@ -44,7 +44,7 @@ public class AnyTypeClassLogic extends AbstractTransactionalLogic<AnyTypeClassTO @Autowired private AnyTypeClassDAO anyTypeClassDAO; - @PreAuthorize("hasRole('" + Entitlement.ANYTYPECLASS_READ + "')") + @PreAuthorize("isAuthenticated()") public AnyTypeClassTO read(final String key) { AnyTypeClass anyType = anyTypeClassDAO.find(key); if (anyType == null) { @@ -56,7 +56,7 @@ public class AnyTypeClassLogic extends AbstractTransactionalLogic<AnyTypeClassTO return binder.getAnyTypeClassTO(anyType); } - @PreAuthorize("hasRole('" + Entitlement.ANYTYPECLASS_LIST + "')") + @PreAuthorize("isAuthenticated()") public List<AnyTypeClassTO> list() { return CollectionUtils.collect(anyTypeClassDAO.findAll(), new Transformer<AnyTypeClass, AnyTypeClassTO>() { http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/core/logic/src/main/java/org/apache/syncope/core/logic/AnyTypeLogic.java ---------------------------------------------------------------------- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/AnyTypeLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/AnyTypeLogic.java index 1ff60c7..6bd0fd5 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/AnyTypeLogic.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/AnyTypeLogic.java @@ -46,7 +46,7 @@ public class AnyTypeLogic extends AbstractTransactionalLogic<AnyTypeTO> { @Autowired private AnyTypeDAO anyTypeDAO; - @PreAuthorize("hasRole('" + Entitlement.ANYTYPE_READ + "')") + @PreAuthorize("isAuthenticated()") public AnyTypeTO read(final String key) { AnyType anyType = anyTypeDAO.find(key); if (anyType == null) { @@ -58,7 +58,7 @@ public class AnyTypeLogic extends AbstractTransactionalLogic<AnyTypeTO> { return binder.getAnyTypeTO(anyType); } - @PreAuthorize("hasRole('" + Entitlement.ANYTYPE_LIST + "')") + @PreAuthorize("isAuthenticated()") public List<AnyTypeTO> list() { return CollectionUtils.collect(anyTypeDAO.findAll(), new Transformer<AnyType, AnyTypeTO>() { http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java ---------------------------------------------------------------------- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java index 3da4a76..cbd5f64 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java @@ -180,7 +180,7 @@ public class SchemaLogic extends AbstractTransactionalLogic<AbstractSchemaTO> { return result; } - @PreAuthorize("hasRole('" + Entitlement.SCHEMA_READ + "')") + @PreAuthorize("isAuthenticated()") @SuppressWarnings("unchecked") public <T extends AbstractSchemaTO> T read(final SchemaType schemaType, final String schemaName) { T read; http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java index e5cf78b..811b429 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java @@ -118,15 +118,6 @@ public class AuthenticationITCase extends AbstractITCase { @Test public void testUserSchemaAuthorization() { - // 0. create a role that can only read schemas - RoleTO roleTO = new RoleTO(); - roleTO.setName("authRole" + getUUIDString()); - roleTO.getEntitlements().add(Entitlement.SCHEMA_READ); - roleTO.getRealms().add("/odd"); - - roleTO = createRole(roleTO); - assertNotNull(roleTO); - String schemaName = "authTestSchema" + getUUIDString(); // 1. create a schema (as admin) @@ -140,8 +131,6 @@ public class AuthenticationITCase extends AbstractITCase { // 2. create an user with the role created above (as admin) UserTO userTO = UserITCase.getUniqueSampleTO("a...@test.org"); - userTO.getRoles().add(roleTO.getKey()); - userTO = createUser(userTO).getAny(); assertNotNull(userTO); http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/fit/enduser-reference/pom.xml ---------------------------------------------------------------------- diff --git a/fit/enduser-reference/pom.xml b/fit/enduser-reference/pom.xml new file mode 100644 index 0000000..aee8f79 --- /dev/null +++ b/fit/enduser-reference/pom.xml @@ -0,0 +1,413 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.syncope</groupId> + <artifactId>syncope-fit</artifactId> + <version>2.0.0-SNAPSHOT</version> + </parent> + + <name>Apache Syncope FIT Enduser Reference</name> + <description>Apache Syncope FIT Enduser Reference</description> + <groupId>org.apache.syncope.fit</groupId> + <artifactId>syncope-fit-enduser-reference</artifactId> + <packaging>war</packaging> + + <properties> + <rootpom.basedir>${basedir}/../..</rootpom.basedir> + </properties> + + <dependencies> + + <dependency> + <groupId>org.apache.syncope.client</groupId> + <artifactId>syncope-client-enduser</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + </dependency> + <dependency> + <groupId>javax.servlet.jsp</groupId> + <artifactId>javax.servlet.jsp-api</artifactId> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jstl</artifactId> + </dependency> + + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency><!-- +--> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + </dependency><!-- +--> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + </dependency><!-- +--> + <dependency> + <groupId>com.lmax</groupId> + <artifactId>disruptor</artifactId> + </dependency><!-- +--> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <scope>provided</scope> + </dependency><!-- +--> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + </dependency> + + <!-- TEST --> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.syncope.fit</groupId> + <artifactId>syncope-fit-build-tools</artifactId> + <version>${project.version}</version> + <type>war</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>net.tirasa.connid.bundles.soap</groupId> + <artifactId>wssample</artifactId> + <type>war</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <scope>test</scope> + </dependency><!-- + + SELENIUM INTEGRATION TEST + <dependency> + <groupId>org.seleniumhq.selenium</groupId> + <artifactId>selenium-java</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.seleniumhq.selenium</groupId> + <artifactId>selenium-api</artifactId> + <scope>test</scope> + </dependency>--> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <inherited>true</inherited> + <configuration> + <failOnMissingWebXml>false</failOnMissingWebXml> + </configuration> + </plugin> + + <plugin> + <groupId>org.codehaus.cargo</groupId> + <artifactId>cargo-maven2-plugin</artifactId> + <inherited>true</inherited> + <configuration> + <container> + <dependencies> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + </dependency> + </dependencies> + </container> + <configuration> + <type>standalone</type> + <properties> + <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port> + <cargo.tomcat.ajp.port>${cargo.tomcat.ajp.port}</cargo.tomcat.ajp.port> + <cargo.rmi.port>${cargo.rmi.port}</cargo.rmi.port> + + <cargo.jvmargs>-XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=512m</cargo.jvmargs> + </properties> + <configfiles> + <configfile> + <file>${project.build.directory}/classes/context.xml</file> + <todir>conf/</todir> + <tofile>context.xml</tofile> + </configfile> + </configfiles> + </configuration> + <deployables> + <deployable> + <groupId>net.tirasa.connid.bundles.soap</groupId> + <artifactId>wssample</artifactId> + <type>war</type> + <properties> + <context>wssample</context> + </properties> + </deployable> + <deployable> + <groupId>org.apache.syncope.fit</groupId> + <artifactId>syncope-fit-build-tools</artifactId> + <type>war</type> + <properties> + <context>syncope-fit-build-tools</context> + </properties> + </deployable> + <deployable> + <location>${basedir}/../core-reference/target/syncope-fit-core-reference-${project.version}</location> + <pingURL>http://localhost:${cargo.servlet.port}/syncope/cacheStats.jsp</pingURL> + <pingTimeout>60000</pingTimeout> + <properties> + <context>syncope</context> + </properties> + </deployable> + <deployable> + <location>${project.build.directory}/${project.build.finalName}</location> + <properties> + <context>syncope-enduser</context> + </properties> + </deployable> + </deployables> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <configuration> + <resourceIncludes>src/main/resources/**/*.properties</resourceIncludes> + </configuration> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>ianal-maven-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + </plugins> + + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + </resources> + </build> + + <profiles> + <profile> + <id>debug</id> + + <properties> + <skipTests>true</skipTests> + </properties> + + <build> + <defaultGoal>clean verify cargo:run</defaultGoal> + + <plugins> + <plugin> + <groupId>org.codehaus.cargo</groupId> + <artifactId>cargo-maven2-plugin</artifactId> + <inherited>true</inherited> + <configuration> + <configuration> + <properties> + <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n + -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=512m</cargo.jvmargs> + </properties> + </configuration> + </configuration> + <executions> + <execution> + <id>start-container</id> + <phase>none</phase> + </execution> + <execution> + <id>stop-container</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + + <profile> + <id>skipTests</id> + + <dependencies> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.codehaus.cargo</groupId> + <artifactId>cargo-maven2-plugin</artifactId> + <inherited>true</inherited> + <configuration> + <deployables> + <deployable> + <location>${project.build.directory}/${project.build.finalName}.war</location> + </deployable> + </deployables> + </configuration> + <executions> + <execution> + <id>install-container</id> + <phase>package</phase> + <goals> + <goal>install</goal> + </goals> + </execution> + <execution> + <id>start-container</id> + <phase>none</phase> + </execution> + <execution> + <id>stop-container</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + + <profile> + <id>jrebel</id> + + <properties> + <javaagent>-javaagent:${env.REBEL_HOME}/jrebel.jar</javaagent> + </properties> + + <build> + <defaultGoal>clean verify cargo:run</defaultGoal> + + <plugins> + <plugin> + <groupId>org.zeroturnaround</groupId> + <artifactId>jrebel-maven-plugin</artifactId> + <inherited>true</inherited> + <configuration> + <classpath> + <fallback>default</fallback> + <resources> + <resource/> + <resource> + <directory>${basedir}/../../client/enduser/target/classes</directory> + </resource> + </resources> + </classpath> + + <web> + <resources> + <resource/> + <resource> + <target>/</target> + <directory>${basedir}/../../client/enduser/target/classes/META-INF/resources/</directory> + </resource> + </resources> + </web> + + <alwaysGenerate>true</alwaysGenerate> + </configuration> + <executions> + <execution> + <id>generate-rebel-xml</id> + <phase>process-resources</phase> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.codehaus.cargo</groupId> + <artifactId>cargo-maven2-plugin</artifactId> + <inherited>true</inherited> + <configuration> + <configuration> + <properties> + <cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n + -noverify ${javaagent} -Drebel.spring_plugin=true + -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs> + </properties> + </configuration> + </configuration> + <executions> + <execution> + <id>start-container</id> + <phase>none</phase> + </execution> + <execution> + <id>stop-container</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + + <profile> + <id>apache-release</id> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + </plugins> + </build> + </profile> + + </profiles> +</project> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/fit/enduser-reference/src/main/resources/context.xml ---------------------------------------------------------------------- diff --git a/fit/enduser-reference/src/main/resources/context.xml b/fit/enduser-reference/src/main/resources/context.xml new file mode 100644 index 0000000..471d561 --- /dev/null +++ b/fit/enduser-reference/src/main/resources/context.xml @@ -0,0 +1,23 @@ +<?xml version='1.0' encoding='utf-8'?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<Context> + <!-- Disable session persistence across Tomcat restarts --> + <Manager pathname=""/> +</Context> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/fit/enduser-reference/src/main/resources/enduser.properties ---------------------------------------------------------------------- diff --git a/fit/enduser-reference/src/main/resources/enduser.properties b/fit/enduser-reference/src/main/resources/enduser.properties new file mode 100644 index 0000000..96b0dea --- /dev/null +++ b/fit/enduser-reference/src/main/resources/enduser.properties @@ -0,0 +1,30 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +enduser.directory=${conf.directory} +scheme=http +host=localhost +port=9080 +rootPath=/syncope/rest/ + +anonymousUser=${anonymousUser} +anonymousKey=${anonymousKey} + +storePassword=true + +version=${syncope.version} +license=${licenseUrl} + http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/fit/enduser-reference/src/main/resources/log4j2.xml ---------------------------------------------------------------------- diff --git a/fit/enduser-reference/src/main/resources/log4j2.xml b/fit/enduser-reference/src/main/resources/log4j2.xml new file mode 100644 index 0000000..ced0e34 --- /dev/null +++ b/fit/enduser-reference/src/main/resources/log4j2.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<configuration status="WARN"> + + <appenders> + + <RollingRandomAccessFile name="main" fileName="${log.directory}/enduser.log" + filePattern="${log.directory}/enduser-%d{yyyy-MM-dd}.log.gz" + immediateFlush="false" append="true"> + <PatternLayout> + <pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern> + </PatternLayout> + <Policies> + <TimeBasedTriggeringPolicy/> + <SizeBasedTriggeringPolicy size="250 MB"/> + </Policies> + </RollingRandomAccessFile> + + </appenders> + + <loggers> + + <asyncLogger name="org.apache.syncope.client.lib" additivity="false" level="OFF"> + <appender-ref ref="main"/> + </asyncLogger> + + <asyncLogger name="org.apache.syncope.client.enduser" additivity="false" level="DEBUG"> + <appender-ref ref="main"/> + </asyncLogger> + + <asyncLogger name="org.apache.wicket" additivity="false" level="DEBUG"> + <appender-ref ref="main"/> + </asyncLogger> + + <root level="DEBUG"> + <appender-ref ref="main"/> + </root> + + </loggers> + +</configuration> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/fit/enduser-reference/src/main/webapp/WEB-INF/glassfish-web.xml ---------------------------------------------------------------------- diff --git a/fit/enduser-reference/src/main/webapp/WEB-INF/glassfish-web.xml b/fit/enduser-reference/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..6400bc2 --- /dev/null +++ b/fit/enduser-reference/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. + +--> +<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD +GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd"> +<glassfish-web-app error-url=""> + <class-loader delegate="false"/> +</glassfish-web-app> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/fit/enduser-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml ---------------------------------------------------------------------- diff --git a/fit/enduser-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/fit/enduser-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml new file mode 100644 index 0000000..f38ebfc --- /dev/null +++ b/fit/enduser-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2"> + <deployment> + <exclude-subsystems> + <subsystem name="webservices"/> + <subsystem name="jaxrs"/> + </exclude-subsystems> + <dependencies> + <module name="org.apache.xalan"/> + </dependencies> + <exclusions> + <module name="javax.ws.rs.api"/> + <module name="org.apache.cxf"/> + <module name="org.apache.cxf.impl"/> + <module name="org.slf4j"/> + <module name="org.slf4j.impl"/> + </exclusions> + </deployment> +</jboss-deployment-structure> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/fit/enduser-reference/src/main/webapp/WEB-INF/weblogic.xml ---------------------------------------------------------------------- diff --git a/fit/enduser-reference/src/main/webapp/WEB-INF/weblogic.xml b/fit/enduser-reference/src/main/webapp/WEB-INF/weblogic.xml new file mode 100644 index 0000000..6e6bd30 --- /dev/null +++ b/fit/enduser-reference/src/main/webapp/WEB-INF/weblogic.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app + http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd"> + + <context-root>syncope-console</context-root> + + <container-descriptor> + <prefer-application-packages> + <package-name>org.apache.commons.*</package-name> + <package-name>org.slf4j.*</package-name> + <package-name>com.fasterxml.jackson.*</package-name> + </prefer-application-packages> + </container-descriptor> + +</weblogic-web-app> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/fit/pom.xml ---------------------------------------------------------------------- diff --git a/fit/pom.xml b/fit/pom.xml index 203e414..072e37a 100644 --- a/fit/pom.xml +++ b/fit/pom.xml @@ -60,6 +60,7 @@ under the License. <module>build-tools</module> <module>core-reference</module> <module>console-reference</module> + <module>enduser-reference</module> </modules> </project> http://git-wip-us.apache.org/repos/asf/syncope/blob/223a64e2/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index bfdfd51..a5ee74a 100644 --- a/pom.xml +++ b/pom.xml @@ -388,7 +388,20 @@ under the License. <wicket.version>7.1.0</wicket.version> <wicket-jqueryui.version>7.1.0</wicket-jqueryui.version> - + + <angular.version>1.4.7</angular.version> + <angular-route.version>1.4.7</angular-route.version> + <angular-resource.version>1.4.7</angular-resource.version> + <angular-cookies.version>1.4.7</angular-cookies.version> + <angular-animate.version>1.4.7</angular-animate.version> + <angular-ui-router.version>0.2.15</angular-ui-router.version> + <angular-ui-bootstrap.version>0.14.0</angular-ui-bootstrap.version> + <angular-ui-select.version>0.13.1</angular-ui-select.version> + <angular-sanitize.version>1.4.7</angular-sanitize.version> + <angular-growl-2.version>0.7.3</angular-growl-2.version> + <select2.version>3.4.8</select2.version> + <FileSaver.version>0.0.2</FileSaver.version> + <izpack.version>5.0.5</izpack.version> <httpclient.version>4.3.6</httpclient.version> <maven-invoker.version>2.1.1</maven-invoker.version> @@ -999,6 +1012,79 @@ under the License. <artifactId>jquery-cookie</artifactId> <version>${jquery-cookie.version}</version> </dependency> + <dependency> + <groupId>org.webjars.bower</groupId> + <artifactId>angular</artifactId> + <version>${angular.version}</version> + </dependency> + <dependency> + <groupId>org.webjars.bower</groupId> + <artifactId>angular-route</artifactId> + <version>${angular-route.version}</version> + </dependency> + <dependency> + <groupId>org.webjars.bower</groupId> + <artifactId>angular-resource</artifactId> + <version>${angular-resource.version}</version> + </dependency> + <dependency> + <groupId>org.webjars.bower</groupId> + <artifactId>angular-cookies</artifactId> + <version>${angular-cookies.version}</version> + </dependency> + <dependency> + <groupId>org.webjars</groupId> + <artifactId>angular-ui-router</artifactId> + <version>${angular-ui-router.version}</version> + </dependency> + <dependency> + <groupId>org.webjars.bower</groupId> + <artifactId>angular-animate</artifactId> + <version>${angular-animate.version}</version> + </dependency> + <dependency> + <groupId>org.webjars</groupId> + <artifactId>angular-ui-bootstrap</artifactId> + <version>${angular-ui-bootstrap.version}</version> + </dependency> + <dependency> + <groupId>org.webjars</groupId> + <artifactId>angular-ui-select</artifactId> + <version>${angular-ui-select.version}</version> + </dependency> + <dependency> + <groupId>org.webjars.bower</groupId> + <artifactId>angular-sanitize</artifactId> + <version>${angular-sanitize.version}</version> + </dependency> + <dependency> + <groupId>org.webjars</groupId> + <artifactId>angular-growl-2</artifactId> + <version>${angular-growl-2.version}</version> + </dependency> + <dependency> + <groupId>org.webjars.bower</groupId> + <artifactId>select2</artifactId> + <version>${select2.version}</version> + <exclusions> + <exclusion> + <groupId>org.webjars.bower</groupId> + <artifactId>jquery</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.webjars.bower</groupId> + <artifactId>FileSaver.js</artifactId> + <version>${FileSaver.version}</version> + </dependency> + + + <dependency> + <groupId>com.beust</groupId> + <artifactId>jcommander</artifactId> + <version>1.47</version> + </dependency> <dependency> <groupId>org.codehaus.izpack</groupId> @@ -1376,6 +1462,7 @@ under the License. <exclude>**/META-INF/cxf/**</exclude> <exclude>**/META-INF/services/**</exclude> <exclude>**/META-INF/MANIFEST.MF</exclude> + <exclude>**/META-INF/resources/app/views/**</exclude> <exclude>**/*.csv</exclude> <exclude>**/archetype-resources/**</exclude> <exclude>**/AdminLTE*/**</exclude>