mirror of
https://codeberg.org/gitnex/GitNex
synced 2025-02-03 12:47:39 +01:00
Gitea >= v1.12.0 only need read rights for Colaborators Tab (#542)
show "Add Collaborator" option only if you have the right to do so gitea >= v1.12.0 only need read rights for Colaborators Tab Signed-off-by: 6543 <6543@obermui.de> Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
This commit is contained in:
parent
d2265aecae
commit
1a95475140
@ -196,7 +196,7 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
|
||||
|
||||
// only show Collaborators if you have permission to
|
||||
final View collaboratorTab = vg.getChildAt(8);
|
||||
if(tinyDb.getBoolean("isRepoAdmin")) {
|
||||
if(tinyDb.getBoolean("isRepoAdmin") || new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||
collaboratorTab.setVisibility(View.VISIBLE);
|
||||
}
|
||||
else {
|
||||
|
@ -71,13 +71,14 @@ public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
|
||||
}
|
||||
});
|
||||
|
||||
addCollaborator.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
bmListener.onButtonClicked("addCollaborator");
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
if (tinyDb.getBoolean("isRepoAdmin")) {
|
||||
addCollaborator.setOnClickListener(v1 -> {
|
||||
bmListener.onButtonClicked("addCollaborator");
|
||||
dismiss();
|
||||
});
|
||||
} else {
|
||||
addCollaborator.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
createRelease.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user